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.

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.