bcgov / design-system

The B.C. Design System helps public sector design and development teams build consistent, accessible products
https://gov.bc.ca/designsystem
Apache License 2.0
56 stars 38 forks source link

Form wrapper #398

Closed mkernohanbc closed 2 months ago

mkernohanbc commented 3 months ago

As we move towards shipping more data-input components (Select, TextField, TextArea, Button), we need to think about how users group several of these components together to build forms.

RAC includes a Form component that acts as a wrapper for multiple individual input components. It groups/associates a set of child inputs together semantically, and provides a parent object that can be targeted to configure styling, data validation and submission.

Form renders an HTML <form> element.

My current assumptions are:

Going to do some initial investigation/prototyping, but will need @ty2k's read on the assumptions I'm making here and what the shape and role of this component could be.

mkernohanbc commented 3 months ago

POC component and Storybook story/docs are on this branch, as a conversation starter: https://github.com/bcgov/design-system/tree/398-form-wrapper