label | string · requiredLabel text for the field (always rendered for accessibility). |
|---|
inputID | string · requiredID for the input element (used for the label htmlFor attribute). |
|---|
labelID | stringID applied to the label element itself for group accessibility. |
|---|
isGroupLabel | boolean · default falseRenders the label as a span for control groups (radiogroup, checkbox list). |
|---|
children | ReactNode · requiredThe input or control to render. |
|---|
isLabelHidden | boolean · default falseVisually hide the label (still accessible to screen readers). |
|---|
isDisabled | boolean · default falseWhether the associated input is disabled. Propagates disabled styling to the label. |
|---|
description | stringDescription text displayed between the label and input. |
|---|
descriptionID | stringID for the description element (use for aria-describedby on the input). |
|---|
isOptional | boolean · default falseWhether the field is optional (mutually exclusive with isRequired). |
|---|
isRequired | boolean · default falseWhether the field is required (mutually exclusive with isOptional). |
|---|
labelIcon | IconTypeIcon to display before the label text. See astryx docs icons for valid semantic names. |
|---|
labelTooltip | stringTooltip text to display in an info icon at the end of the label. |
|---|
status | {type: 'warning' | 'error' | 'success', message?: string, messageID?: string}Status indicator with type and optional message. When message is set, displays a colored status box. messageID is for wiring aria-describedby on the input. |
|---|
statusVariant | 'attached' | 'detached' · default 'attached'How the status message renders relative to the input. Attached overlaps the input border; detached floats below. |
|---|
width | SizeValueWidth of the field (number = pixels, string used as-is, e.g. "100%"). Sizes the whole field (label, control, and status) so they stay aligned. Prefer this over setting width via xstyle/className/style, which only size the inner control box. |
|---|
ref | React.Ref<HTMLDivElement>Ref forwarded to the root element. |
|---|
xstyle | StyleXStylesStyleX styles for layout customization (margins, positioning, sizing). Must be a stylex.create() value: not an inline style object like style={{}}. |
|---|
className | stringCSS class name(s) appended to the root element. Prefer xstyle for StyleX deduplication. |
|---|
style | React.CSSPropertiesInline styles applied to the root element. Takes priority over StyleX inline styles. |
|---|