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
| Prop | Type | Default | Description |
|---|---|---|---|
id | string | - | Required; message ids derive from it. |
label | string | - | Label text, wired with for. |
hint | string | - | Renders #{id}-hint. |
error | string | - | Renders #{id}-error. |
hideLabel | boolean | false | Label present for AT, visually hidden. |
Accessibility
- Wire
aria-describedby="{id}-hint {id}-error"on your control (input components do this automatically). hideLabelstill announces: it is clipped, not removed.