Skip to content

Add className support to internal typography in Button (EDS 2.0) #4533

Description

@StianIsmar

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

Yes. In components such as Button, we currently lack the ability to reliably target internal typography or styling through a className.
Because of this, any style customization (e.g., color, font size, etc.) must be done using fragile CSS selectors like .eds-button > p, which is not safe or maintainable.

Describe the solution you’d like

We would like support for passing a className to the internal typography element (e.g., TypographyNext) used within the Button component.
This would allow consumers to apply style overrides in a predictable and maintainable way, without relying on brittle DOM-structure selectors.

Describe alternatives you’ve considered

The current workaround is to target nested elements using CSS selectors based on DOM structure.
However, this approach is fragile, can easily break with internal refactoring, and does not provide a stable styling contract for consumers.

Additional context

Having classNames in the the components would help us a lot, not only in the button, but if this could be something for all the components.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions