Skip to content

Checkbox className replaces its internal input class #5323

Description

@HaakonSvane

Describe the bug

Passing className to Checkbox replaces the class that visually hides the native checkbox input, instead of merging with it. Both the native checkbox and the EDS-styled checkbox render simultaneously.

Steps to reproduce

  1. Render <Checkbox className="some-custom-class" />
  2. Observe the native browser checkbox renders alongside the styled EDS checkbox instead of being hidden.

Expected behavior

className merges with the component's internal classes rather than overwriting the one that hides the native input.

Specifications

  • Version: @equinor/eds-core-react@3.0.0-beta.1

Additional context

Workaround: avoid passing className directly to Checkbox; apply layout styling to an external wrapper element instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions