Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[feat] Create required asterisk component #2523

@werdnanoslen

Description

@werdnanoslen

Does your feature request relate to a specific USWDS component?

All form components

What USWDS Version is this feature present in?

3.5.0 via uswds/uswds-site#1834

Is your feature request related to a problem? Please describe.

New guidance from USWDS on showing required fields: https://designsystem.digital.gov/templates/form-templates/#identifying-required-fields-2

Describe the solution you'd like

  1. Create an asterisk component that uses USWDS' <abbr>-based element
  2. Import the component into the Label component and give it a boolean prop to toggle its inclusion

Describe alternatives you've considered

  1. Simply copy-paste your own required asterisk code into every Label (still possible)
  2. Create just the component and manually add the component to the Label's instance (also still possible)

Additional context

When using this, it's still important to put a message at the top of a form that explains what this asterisk is (e.g. "Required fields are marked with an asterisk (*)") and to use the standard required prop

Metadata

Metadata

Assignees

Labels

status: needs requirementsThis issue is NOT ready for development - it needs further scope clarification or questions answeredtype: featureNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions