-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
Description
Need to export the individual pieces of a field as separate components, like <FieldLayout>, <FieldLabel> and <FieldMessage>. The user would be responsible for hooking up props between them (like htmlFor and aria-labelledby), but it would allow a Fluent v9 field to be constructed from its parts. Something like this: (very much TBD exactly how it would work)
<FieldLayout>
<FieldLabel htmlFor="my-input">Example label</FieldLabel>
<MyInput id="my-input" aria-invalid="true" aria-errormessage="my-error-message" aria-describedby="my-hint" />
<FieldMessage id="my-error-message" validationState="error">Example error message</FieldMessage>
<FieldMessage id="my-hint">Example hint text</FieldMessage>
</FieldLayout>Original discussion: #25463
Reactions are currently unavailable