<FieldLabel
el="label"
htmlFor="input-id"
required={true}
moreInfo="Additional context for users"
>
Label Text
</FieldLabel>
FieldLabel Props
The FieldLabel component is polymorphic and accepts props based on the element type specified by el. In addition to standard HTML attributes for the chosen element, it accepts:aiMark
boolean | AiMarkWithTooltipOrPopoverConfig
Displays an AI indicator icon next to the label. See AI Marks for full API documentation and usage examples. The label text. When passed as a plain string, supports inline markdown for bold (**text**), italic (*text*), bold and italic (***text***), highlight (==text==), and code (`text`) formatting. Markdown is stripped from the accessible text exposed to screen readers.
Passing ReactNode is deprecated — use a plain string with inline markdown instead. children will be required to be a string in v4.0.0.
el
ElementType
default:"label"
The HTML element to render. Common values: "label" (default), "legend".
Unique identifier for the label element.
Additional information to display in a tooltip next to the label text.
Controls the open state of the more info tooltip.
Whether the field is required. Shows a red asterisk (*) and announces “Required” to screen readers.
When el="label" (default)
Standard label props are available:The ID of the form element this label is associated with.
When el="legend"
Standard legend props are available. Typically used within a <fieldset>.