StrikekitStrikekit

clear

Empty an input field by label

Clear the current value of a labeled input.

Syntax

When I clear "<target>" [by …]

Requirements

ItemContract
Element / control shapeSame as fill: input / textarea only
How the label bindsSame fill auto-find order (id, data-testid, aria-label, name, placeholder, …)
Qualifiers that change resolveOptional by … find hint
PlatformWeb / mobile
Wrong shape → use insteadNon-input controls → not supported for clear

When it fails

  • Same patterns as fill: not found / timeout / disabled / ambiguous.

See also UI contracts.

Examples

When I clear "search"
When I fill "search" with "laptop"
When I clear "search" by name

On this page