Forms and controls
Form components render native elements, then layer the Silva visual system on top. Pair labels with matchingid values for accessible controls.
Field composition
Form is a vertical form wrapper. Field groups a control with error or helperText; its FieldError and FieldHelper exports are available for custom layouts.
- Preview
- Code
Inputs
Input, TextArea, and Label support sm, md and lg sizes. Inputs expose the standard native fields such as name, value, defaultValue, disabled, required, and onChange.
- Preview
- Code
Select
Select accepts native <option> children and provides an accessible trigger, keyboard navigation, and a listbox of choices.
- Preview
- Code
Choice controls
- Preview
- Code
Switch
Switch is a labelled native checkbox with role="switch". Use checked for controlled state or defaultChecked for an initial value.
- Preview
- Code
Slider
Slider renders a native range input with min, max, step, value, and defaultValue support.
- Preview
- Code
Toggle group
ToggleGroup groups related toggle buttons. Apply data-active from your application state to the selected ToggleGroupItem.
- Preview
- Code
Buttons
Button supports xs through xl sizes and solid, outline, ghost, and link variants.
- Preview
- Code