designsystemet icon indicating copy to clipboard operation
designsystemet copied to clipboard

`data-color` has no effect on Label

Open larsjohan opened this issue 1 month ago • 1 comments

Version number

1.7.3

Description of the bug

Applying a color to Typography -> Label using data-color has no effect.

If this is intentional, the argument should be removed from the documentation as it creates some confusion.

Steps To Reproduce

  1. Go to Designsystemet's own Storybook
  2. Scroll down to the Label-component
  3. Change the value of data-color
  4. Observe the rendered label. No change.

Additional Information

The same behavior is observed when implemented in plain HTML.

larsjohan avatar Nov 20 '25 12:11 larsjohan

Hi, Label is classified as a "neutral" component, which means it won't change color unless you yourself add this functionality. You can read more about colors in code here: https://designsystemet.no/no/fundamentals/code/colors

data-color is supported on all elements, not only Designsystemet-components.

Barsnes avatar Nov 20 '25 13:11 Barsnes