Input
A form component that accepts single-line textual input from the user.
Disabled
Use the disabled attr or the disabled class to disable an item component.
Valid
Use the data-valid attr or the valid class to indicate an valid state.
Invalid
Use the data-invalid attr or the invalid class to indicate an invalid state.
Sizes
Use the input-{size} class to control the component size.
Size values can include:smmdlg.
For more information on all available sizing utilities, visit Tailwind
Variants
Use the variant and palette classes to control the appereance of the component.
Variant values can include solidoutlinesurfacesubtleplain.
Color palettes can include primaryneutral. For extra palettes such as warning error and more, refer to the Colors section.
Customizing
globals.css
:root {
--ex-input-font-family: var(--font-sans);
--ex-input-font-weight: var(--font-weight-normal);
--ex-input-font-size-sm: var(--text-xs);
--ex-input-font-size-md: var(--text-sm);
--ex-input-font-size-lg: var(--text-base);
--ex-input-height-sm: calc(var(--spacing) * 9);
--ex-input-height-md: calc(var(--spacing) * 10);
--ex-input-height-lg: calc(var(--spacing) * 11);
--ex-input-px-sm: calc(var(--spacing) * 3.5);
--ex-input-px-md: calc(var(--spacing) * 4);
--ex-input-px-lg: calc(var(--spacing) * 4.5);
--ex-input-radius-sm: var(--radius-sm);
--ex-input-radius-md: var(--radius-sm);
--ex-input-radius-lg: var(--radius-sm);
}API
| Element | Selector |
|---|---|
Input | .ex-input |
| Prop | Type | Default |
|---|---|---|
as | ElementType | input |
asChild | boolean | false |
Last updated on