SuperdindaDocs
Inputs

Input

The DS text input (Figma "Input" 169:221): a base-ui Input inside the field box, so it plugs into Form Field (label, hint, error) and into plain forms (`name`, `ref`, react-hook-form `register`).

Fills its container.

<Input size="48" placeholder="Nome completo" value={name} onValueChange={setName} />

Playground

Um preset por valor do primeiro eixo do Figma. Mude as props; dsState força hover, foco ou pressionado, como na matriz.

Input

string
string
string
boolean

Variantes, tamanhos e estados

Cada célula é o componente real, marcada com a variante do Figma que reproduz (passe o mouse pra ver o node).

Size · 44

PlaceholderFilledFocusErrorDisabledSuggestionHoverRead-only

Size · 48

PlaceholderFilledFocusErrorDisabledSuggestionHoverRead-only

Size · Default

PlaceholderFilledFocusErrorDisabledSuggestionHoverRead-only

Size · 40

PlaceholderFilledFocusErrorDisabledSuggestionHoverRead-only

Props

As props que o arquivo do DS declara. O componente também repassa as do primitivo (base-ui), quando ele tem um.

PropTipoPadrãoDescrição
FieldBoxSize"48"Box height in px; "default" is the 32 px compact size.
ReactNode—Figma "Leading icon" (a lucide element), decorative: say it in the label.
ReactNode—Figma "Trailing icon", decorative (a calendar glyph, the CEP spinner).
boolean—Error look + `aria-invalid`. Inside a Form Field, pass `error` there instead.
string—Figma `State=Suggestion`: the ghost text drawn after the typed value (e.g. the rest of an e-mail domain). Drawn after `value` (or the initial `defaultValue`), so keep the input controlled while it shows. Accepting it is the caller's job (Email Input does it on Tab and →).
string—Classes for the box (width goes here: the box fills its container).
boolean—

On this page