Skip to content

[Label] hover effect should match label element #1233

Closed
@penx

Description

@penx

Bug report

Current Behavior

If you hover over a <label /> associated with a Radix Checkbox (or <input />), the checkbox's hover state is triggered.

If you hover over a <LabelPrimitive.Root /> associated with a checkbox (or <input />), the checkbox's hover state is not triggered.

Expected behavior

The behaviour of <LabelPrimitive.Root /> should match <label /> .

If you follow the documentation for Checkbox:

https://www.radix-ui.com/docs/primitives/components/checkbox

It shows usage with a standard label element, including a hover effect. If you then switch to using Radix' label component, you lose the hover effect.

Reproducible example

Hover over the labels in this example:

https://codesandbox.io/s/ecstatic-rosalind-eky4tl

Your environment

Software Name(s) Version
Radix Package(s) react-checkbox, react-label 0.1.5
React 17.0.2
Browser Chromium 98.0.4758.109
Operating System macOS 11.6

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions