Field
A text input that covers the whole family through props: floating, inset or hidden labels, hint, error, add-ons, clear, password reveal, count and shortcut, on a native input.
pixikit.com/docs/components/field
Customize
Label style
Success
Addon style
Shape
Variant
Size
Clearable
Revealable
Show count
Loading
Props
20| Name | Type | Default | Description |
|---|---|---|---|
label | string | None | The text that names the field. |
labelStyle | "above" | "floating" | "inset" | "hidden" | "above" | Where the label sits: above the box, gliding up from inside it, small inside it above the value, or hidden from sight but still read. |
hint | string | None | Help text under the field. |
cornerHint | string | None | Short text opposite the label, such as Optional. |
error | string | None | An error message. It marks the field invalid, is linked to the input and slides in under it. |
success | boolean | false | Marks the field as correct with a check and a green edge. |
leading | ReactNode | None | An icon or other node at the start, inside the box. |
trailing | ReactNode | None | An icon or other node at the end, inside the box. |
prefix | string | None | Text before the value, such as a currency sign. |
suffix | string | None | Text after the value, such as a unit or domain. |
addonStyle | "inline" | "attached" | "inline" | `inline` sets the add-ons in the box; `attached` joins them as cells with their own background. |
shape | "rounded" | "pill" | "rounded" | The corner shape of the box. |
variant | "outline" | "filled" | "outline" | `outline` draws a border; `filled` uses a muted background with an underline that grows on focus. |
size | "sm" | "md" | "lg" | "md" | The height of the field. |
clearable | boolean | false | Shows a button that empties the field when it has a value. |
revealable | boolean | false | For a password field: a button that shows or hides the text. |
showCount | boolean | false | Shows how many characters there are, out of `maxLength` when it is set. |
loading | boolean | false | Shows a small spinner at the end. |
shortcut | string | None | A key hint at the end, such as /. |
className | string | None |