Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Make id and name optional #2776

Open
lpsinger opened this issue Feb 22, 2024 · 0 comments
Open

[docs] Make id and name optional #2776

lpsinger opened this issue Feb 22, 2024 · 0 comments
Labels
type: documentation Improvements or additions to documentation

Comments

@lpsinger
Copy link
Contributor

Does this documentation relate to a specific USWDS feature?
No, it's a general question about the design of many components.

Is your documentation related to a problem or inconsistency? Please describe.
The documentation on adding new components says:

Require props that are fundamental to the element (such as id and name for a form input), even if they aren't necessarily "required" HTML attributes. - Make all other props optional.

In practice, with react-uswds components, I find that sometimes I assign dummy values for id or name or both that I never need to refer to elsewhere, although sometimes I do specify and use both.

Describe the documentation you'd like
Would you consider removing this guideline and making id and name optional throughout? It would cut down on the amount of boilerplate required to use react-uswds components.

Additional context
See #2752. CC @haworku.

@lpsinger lpsinger added the type: documentation Improvements or additions to documentation label Feb 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant