Skip to main content

Field

Capture user text input, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
labelstring-
descriptionstring-
errorstring-
successstring-Green border, a check icon & this message in place of description.
Green border, a check icon & this message in place of description.
iconReactNode-
iconPositionleading | trailingleadingWhich end icon sits at.
Which end icon sits at.
iconInteractivebooleanfalseLets icon receive pointer events, for an inline button, a clear or reveal toggle, instead of a decorative glyph.
Lets icon receive pointer events, for an inline button, a clear or reveal toggle, instead of a decorative glyph.
prefixNodeReactNode-
suffixReactNode-Static content flush against the control's trailing edge, like a domain suffix.
Static content flush against the control's trailing edge, like a domain suffix.
placeholderstring-Placeholder text.
Placeholder text.
typestringtext
revealablebooleanfalse
invalidbooleanfalse
sizesm | md | lgmdHeight and width of the control.
Height and width of the control.
shapenone | rounded | pillrounded
disabledbooleanfalseBlocks interaction and dims the whole field, label included.
Blocks interaction and dims the whole field, label included.
requiredbooleanfalseAppends a red asterisk to the label & sets the control's native required attribute.
Appends a red asterisk to the label & sets the control's native required attribute.
classNamestring-
focusboolean | stringtrue