Skip to content

USWDS - Feature: Move usa-input--[width] classes to the usa-input module #5312

@jamigibbs

Description

@jamigibbs

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

We have a need for applying the .usa-input--[width] class to a standalone web component. I had hoped that those classes were included with the usa-input module but they are instead in usa-form nested under the .usa-form class.

https://github.com/uswds/uswds/blob/develop/packages/usa-form/src/styles/_usa-form.scss

Being an individual component, I did not think it appropriate to wrap it with .usa-form just so that we could access the width classes. It seems like .usa-form is intended to be used on a wrapping element around an entire form.

Describe the solution you'd like

It would be ideal in our use case to have the usa-input--[width] available as part of the usa-input module. As it is now, we would need to copy those classes into our component library as a mixin which isn't ideal because we'd like to continue to pull them directly from the USWDS library instead.

Describe alternatives you've considered

No response

Additional context

No response

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions