Payment method
Card details for this workspace
16 digits on the front of the card
One labeled control with optional hint and an error or success message. Label on top or start (left).
Label, control, hint, and error as one piece. FieldSet is the form group. No FieldLabel, Form, or FormDisplay.
A payment form from kit Card, Field, FieldSet, Input, Select, Textarea, and Checkbox.
Use Field for a labeled control. Use FieldSet when a legend wraps related fields. settings-form is the page pattern.
Field wraps one control. FieldSet is the legend group. Card is the chrome. Do not add Form or FieldLabel.
import { Field } from "agentic-ds-kit";From contracts/field.json: must is the a11y requirements, defaults the prop defaults, stops if the doNot rules where the agent asks instead of inventing a cousin.
| Name | Type | Required | Default | Notes |
|---|---|---|---|---|
| label | string | Yes | — | — |
| htmlFor | string | Yes | — | — |
| hint | string | No | — | Helper text, 12/16 muted, 4px under the control. Stays when error or success shows; the message goes under it. |
| help | string | No | — | Extra explanation. Field puts HelpPopover beside the label (placement right). title is the Field label. content is help. Not a substitute for hint. |
| helpLabel | string | No | Help | Name of the help button shown with help. Set it to translate. |
| error | string | No | — | Says what to do (Enter a postcode with 5 digits), not Invalid input. CircleX 16px icon plus text.danger words. No role=alert: an Alert error summary announces errors on submit. Wins over success. |
| success | string | No | — | Confirmation under the hint, e.g. Email verified. CircleCheck 16px icon plus text.success words, never colour alone. Hidden while error is set. |
| optional | boolean | No | false | Adds the muted word Optional (KitLabels optional) after the label. Mark the rarer kind: when most fields are required, the optional ones say Optional. Ignored when required is set. |
| required | boolean | No | false | Sets aria-required on the control when its named element takes it (Input, Textarea, Checkbox, Switch, ColorPicker). No asterisk. Button triggers (Select, the date pickers) are left alone. |
| changed | boolean | No | false | The value differs from the last save. Adds the word Edited (KitLabels edited), 12/16 text.brand with a 12px Pencil, beside the label and outside it, so the label stays the control's name. Its id ({htmlFor}-changed) leads describedBy. Put the old value in hint (Was "Northwind Traders Ltd"). Pair with SaveBar, which lists the changed fields. |
| labelPosition | top | start | No | top | top stacks. start is horizontal (label left). Hint and error stay under the control. |
| children | slot | Yes | — | — |