Skip to content
PixiKit

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
NameTypeDefaultDescription
labelstringNoneThe 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.
hintstringNoneHelp text under the field.
cornerHintstringNoneShort text opposite the label, such as Optional.
errorstringNoneAn error message. It marks the field invalid, is linked to the input and slides in under it.
successbooleanfalseMarks the field as correct with a check and a green edge.
leadingReactNodeNoneAn icon or other node at the start, inside the box.
trailingReactNodeNoneAn icon or other node at the end, inside the box.
prefixstringNoneText before the value, such as a currency sign.
suffixstringNoneText 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.
clearablebooleanfalseShows a button that empties the field when it has a value.
revealablebooleanfalseFor a password field: a button that shows or hides the text.
showCountbooleanfalseShows how many characters there are, out of `maxLength` when it is set.
loadingbooleanfalseShows a small spinner at the end.
shortcutstringNoneA key hint at the end, such as /.
classNamestringNone

More forms components in Pro

View all

Related