v1.1.6
Fieldset
Experimental
This component is considered experimental. Reach out to the Spark team to find out more about what this means.
Installation
Install
yarn add @spark-web/fieldset
Source GitHub.com
Bundle unpkg.com
Use the Fieldset
to group thematically related controls in a form.
Example
Legend
Provide a caption that describes the set of form fields.
Props
Prop | Type | Description |
---|---|---|
children? | ReactNode: string | number | false | true | {} | ReactElement<any, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | The form fields that comprise the set. |
data? | DataAttributeMap | Sets data attributes on the component. |
gap? | "small" | "medium" | "large" | Sets the size of the gap between the legend and children. Default: |
id? | string | An identifier which must be unique in the whole document. |
legend? | string | Provide a caption that describes the set of form fields. @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend |