Skip to content

Field

Label, hint, and error wrapper for any control, including ones you compose yourself. All astro-ink inputs render one internally.

Wrapping a custom control

Shown on your invoices.

<Field id="color" label="Brand color" hint="Shown on your invoices.">
  <input id="color" name="color" type="color" value="#c2410c" />
</Field>

Props

PropTypeDefaultDescription
idstring-Required; message ids derive from it.
labelstring-Label text, wired with for.
hintstring-Renders #{id}-hint.
errorstring-Renders #{id}-error.
hideLabelbooleanfalseLabel present for AT, visually hidden.

Accessibility