Forms & Input
Components

Forms & Input

All form controls in the library: text fields, selectors, choice inputs, rating, file handling, and date pickers.

Components in this category

Input

Single-line text input with affix slots and validation state.

SearchInput

Text input with search icon and clear button.

PasswordInput

Masked field with a reveal toggle.

PasswordStrength

Displays a password strength estimate.

Textarea

Multi-line text input with auto-resize.

NumberInput

Numeric input with step controls.

Select

Dropdown selector with search and multi-select support.

SelectTrigger

The trigger button for a Select, used in custom menus.

EnvSelect

Environment selector (dev / staging / production) with color coding.

Autocomplete

Text input with dropdown suggestions.

Checkbox

Boolean checkbox with indeterminate state.

CheckboxField

Checkbox with a label, description and validation.

CheckboxGroup

Group of checkboxes with select-all support.

Radio

Radio button, always used inside a RadioGroup.

RadioGroup

Mutually-exclusive radio button group.

Switch

Toggle switch for boolean settings.

Slider

Range slider with single or double thumbs.

SegmentedControl

Horizontal button group for mutually-exclusive options.

Rating

Read-only star (or custom icon) rating display.

RatingInput

Interactive star rating for user input.

ColorPicker

Color picker with swatch grid and custom hex input.

IconPicker

Icon picker with a searchable grid, Tabler defaults and injectable custom icons.

TokenField

Multiple-value input rendered as removable tokens.

FileUpload

File upload with drag-and-drop, progress and validation.

Dropzone

Drag-and-drop target area.

FileList

List of uploaded files with status and actions.

TransferList

Two-panel list for moving items between source and target.

DatePicker

Single-date calendar picker with presets.

DateRangePicker

Date range calendar picker with presets.

DateRangeField

Text field for typing a date range directly.

MiniCalendar

Compact calendar month view for date selection.

Text inputs

The five text-entry controls (Input, SearchInput, PasswordInput, Textarea, and NumberInput) share the same visual shell, sizing, and invalid state handling. Each accepts standard HTML attributes for its native element.

Input

Input wraps a native <input> in the shared Control shell, with optional leading and trailing icon slots.

InputProps props
PropTypeDefaultDescription
typestring"text"text, password, email, number, etc.
placeholderstring—Placeholder text.
valuestring—Controlled value.
onChangeReact.ChangeEventHandler—Change handler.
leftIconReactNode—Leading icon slot.
rightIconReactNode—Trailing icon slot.
size"sm" | "md""md"Control size.
invalidboolean—Red border and focus ring.
disabledboolean—Prevents interaction.
readOnlyboolean—Read-only, focusable.
monoboolean—Monospace font.
Input
ImportTSX
import { Input } from "@solarius/onset";

<Input placeholder="Email" type="email" size="md" />
<Input leftIcon={<IconSearch size={13} />} placeholder="Search…" />
<Input invalid message="This field is required" />

SearchInput

SearchInput is Input with a built-in search icon and a default placeholder="Search…".

SearchInput

PasswordInput

PasswordInput is Input with a lock icon and a reveal toggle. The toggle is out of the tab order, so it never sits between the field and the submit button. Pair it with PasswordStrength wherever a password is being chosen rather than entered. Full page →

PasswordInput

Textarea

Multi-line text field in the same Control shell as Input.

TextareaProps props
PropTypeDefaultDescription
valuestring—Controlled value.
onChangeReact.ChangeEventHandler—Change handler.
rowsnumber—Visible rows.
placeholderstring—Placeholder text.
noResizeboolean—Disable manual resizing.
monoboolean—Monospace font.
invalidboolean—Red border and focus ring.
Textarea

NumberInput

Numeric field with stepper buttons, arrow-key and scroll stepping, press-and-hold repeat, and a clamp on blur. Accepts optional prefix and suffix units.

NumberInputProps props
PropTypeDefaultDescription
valuenumber | null—Controlled value.
onChange(value: number | null) => void—Change handler.
minnumber—Minimum value.
maxnumber—Maximum value.
stepnumber1Step increment.
shiftStepnumber10Step multiplier while Shift is held.
prefixReactNode—Static text before the number (e.g. '$').
suffixReactNode—Static text after the number (e.g. 'ms').
hideStepperboolean—Hide the spinner buttons.
NumberInput

Selectors

Select

Select is a dropdown picker built from SelectTrigger + Popover + ContextMenu. Pick an option from a positioned list; the trigger label updates.

SelectProps props
PropTypeDefaultDescription
optionsSelectOption[]—Available choices.
valuestring—Controlled value.
defaultValuestring—Initial uncontrolled value.
onChange(value: string) => void—Selection handler.
placeholderReactNode—Shown when nothing is selected.
size"sm" | "md""md"Control size.
Select

SelectTrigger

SelectTrigger is the dropdown-style button used by Select. Use it directly when pairing with a custom DropdownMenu or Popover.

EnvSelect

EnvSelect is the environment picker from the topbar: a compact button with a toned StatusDot and caret. Pass a tone ("ok", "warn", "err", "idle", "prov") and children.

EnvSelect

Autocomplete

Free-text combobox: type to filter, ↑/↓ to move, Enter to commit. Supports grouping, remote search via onInputChange + disableFilter, and an inline "Create…" row.

AutocompleteProps props
PropTypeDefaultDescription
optionsAutocompleteOption[]—Available choices.
valuestring | null—Currently selected value.
onChange(value: string | null, option: AutocompleteOption | null) => void—Selection handler.
inputValuestring—Controlled query text (for remote search).
onInputChange(query: string) => void—Query change handler.
filter(option, query) => boolean—Custom filter function.
disableFilterboolean—Skip local filtering (server-side).
loadingboolean—Shows a spinner.
onCreate(query: string) => void—Show 'Create…' row.
Autocomplete

Choice inputs

Checkbox

Bare check box with no label. Use it as the base for CheckboxField and CheckboxGroup. Supports indeterminate for select-all headers.

CheckboxProps props
PropTypeDefaultDescription
checkedboolean—Checked state.
onChange(checked: boolean) => void—Toggle handler.
indeterminateboolean—Renders the mixed dash, aria-checked='mixed'.
size"sm" | "md""sm"sm for table rows, md for form rows.
disabledboolean—Prevents interaction.
Checkbox

CheckboxField

Labeled form checkbox that wraps a native <input type="checkbox"> for form and keyboard semantics. Supports a dim description line.

CheckboxField

CheckboxGroup

Multi-select checkbox list with an optional tri-state "select all" parent row.

CheckboxGroup

Radio / RadioGroup

Mutually-exclusive choice. Radio must live inside a RadioGroup. Supports inline layout via inline on the group.

RadioGroup

Switch

Toggle switch for boolean settings, rendered as a role="switch" button.

SwitchProps props
PropTypeDefaultDescription
checkedboolean—On/off state.
onChange(checked: boolean) => void—Toggle handler.
disabledboolean—Prevents interaction.
Switch

Slider

Range slider with an optional numeric readout. The filled portion of the track uses the primary color.

SliderProps props
PropTypeDefaultDescription
valuenumber—Controlled value.
defaultValuenumber—Initial uncontrolled value.
onChange(value: number) => void—Change handler.
minnumber0Minimum value.
maxnumber100Maximum value.
stepnumber1Step increment.
showValueboolean | (value: number) => string—Show numeric readout.
50
Slider

SegmentedControl

Inline mutually-exclusive picker: a tighter alternative to Tabs for toolbar contexts like time range or view mode switching.

SegmentedControl

Rating

Rating

Read-only star display with fractional fills. Renders as role="img" with an accessible label.

RatingProps props
PropTypeDefaultDescription
valuenumber—Numeric rating.
maxnumber5Number of symbols.
sizenumber12Star size in px.
labelReactNode—Dim trailing text (e.g. '4.6 · 218 reviews').
colorstringvar(--m-color-warn)Star color.
Rating

RatingInput

Interactive star input with hover preview, keyboard navigation, and optional labels text. Clicking the current value clears it (when clearable).

RatingInputProps props
PropTypeDefaultDescription
valuenumber—Controlled value.
defaultValuenumber—Initial uncontrolled value.
onChange(value: number) => void—Change handler.
maxnumber5Number of stars.
clearablebooleantrueClicking current value clears it to 0.
labelsstring[]—Text for each level (index 0 = one star).
RatingInput

Other inputs

ColorPicker

Swatch trigger that opens an HSL picker with a saturation/lightness field, hue rail, hex entry, and preset swatches. Color is stored in HSL internally but the public value is always a #rrggbb string.

ColorPickerProps props
PropTypeDefaultDescription
valuestring—Controlled hex color.
defaultValuestring"#7366ff"Initial uncontrolled color.
onChange(hex: string) => void—Change handler.
swatchesstring[]DEFAULT_SWATCHESPreset row. Pass [] to hide.
showValuebooleantrueShow the hex next to the swatch.
ColorPicker
ImportTSX
import { ColorPicker, DEFAULT_SWATCHES } from "@solarius/onset";

<ColorPicker value="#7366ff" onChange={setColor} swatches={DEFAULT_SWATCHES} />;

TokenField

Multi-value tag input: type + Enter to add, Backspace to pop, with an optional suggestion dropdown.

TokenFieldProps props
PropTypeDefaultDescription
valuesstring[]—Controlled values.
defaultValuesstring[]—Initial uncontrolled values.
onChange(values: string[]) => void—Change handler.
suggestionsstring[]—Dropdown suggestions as the user types.
placeholderstring"Add…"Placeholder text.
allowCustombooleantrueAllow values not in suggestions.
TokenField

FileUpload / Dropzone / FileList

Dropzone is the drag-and-drop + click-to-browse target. FileList renders uploaded-file rows with per-file progress and removal. FileUpload composes both. formatFileSize is exported for formatting bytes.

ImportTSX
import {
  Dropzone,
  FileList,
  FileUpload,
  formatFileSize,
} from "@solarius/onset";
import type { UploadFile } from "@solarius/onset";

TransferList

Dual-listbox assignment control: check items and move them across with arrow buttons. Commonly used for territory, role, and segment membership.

TransferListProps props
PropTypeDefaultDescription
itemsTransferItem[]—All available items.
targetIdsstring[]—Ids currently on the right (assigned) side.
onChange(targetIds: string[]) => void—Assignment change handler.
titles[ReactNode, ReactNode]["Available", "Assigned"]Column titles.
searchablebooleantrueShow search boxes above each list.
listHeightnumber168List body height in px.
TransferList

File handling

Specimen examples for Dropzone, FileList, and FileUpload.

Dropzone
FileList
FileUpload

Date & time

DatePicker

Input-bound single-date picker: MiniCalendar in a popover, plus a text field you can type into. Supports presets for quick selection rows.

DatePickerProps props
PropTypeDefaultDescription
valueDate | null—Controlled date.
defaultValueDate | null—Initial uncontrolled date.
onChange(date: Date | null) => void—Selection handler.
minDate—Earliest selectable date.
maxDate—Latest selectable date.
presets{ label, date }[]DEFAULT_DATE_PRESETSQuick rows above the calendar.
placeholderstring"Pick a date"Placeholder text.
clearablebooleantrueShow a clear button.
DatePicker
ImportTSX
import { DatePicker, DEFAULT_DATE_PRESETS } from "@solarius/onset";

DateRangePicker

Preset-driven analytics range selector with a two-month MiniCalendar grid. Unlike DateRangeField, this is always populated; use it when a date range is required context (a dashboard, a report).

DateRangePicker

DateRangeField

Two-date variant bound to a single field: click to pick a start, click again for the end. Reads as a form control and can be empty. Use formatDateRange to display a DateRange in text.

DateRangeField

MiniCalendar

Compact month grid, standalone in a card or as the calendar half of the date pickers. Supports single-date selection or range highlighting via rangeStart/rangeEnd.

MiniCalendar