Overview Button Copy button Field Input Number field Textarea Select Combobox Multiselect Date picker Date range picker Date-time picker Checkbox Radio group Position picker Switch Slider Dropzone Device controls Avatar Badge Card Collapsible Kbd Map Matrix Proportion bar Separator Stat Table Timeline Chat Playback Pagination Charts Chart theming Profile chart Time series chart Bar chart Isopleth chart TS diagram Box plot Rose chart Calendar chart Banner Toast Loader Progress Skeleton Empty state Error state Dropdown menu Tooltip Info tooltip Dialog Sheet Resizable Confirm dialog Breadcrumbs Command palette Mobile menu Navigation list Outline Scroll rail Sidebar Tabs
Input
One line of text. Same height, edge and radius as a secondary button, so a field and a button sit together.
Playground
Size
<Input bind:value={name} placeholder="Mission name" /> Prefix and suffix
Text that's always there, outside the value: a unit, a domain.
m
kystdata.io/
With a button
Same size, so they line up.
In a field
Label above, help or error below: see Field.
An MMSI is 9 digits.
Rules
- Every input has a label, usually through a Field. A placeholder is an example of what goes in, never the name of the field.
- Size it to what goes in: a postcode field is short, a description is wide. Full width only when the content can be long.
- Same height as the buttons beside it: md with md, sm with sm. A field and its button line up.
- Fixed text goes in prefix or suffix, not the value: the unit after a depth, the domain before a slug.