Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#11019·chakra-ui

Checkbox `_checked` styles being overwritten by Checkmark recipe styles

Author: questionmarcusCreated Sep 30, 2026Updated Sep 30, 2026

Description

When I apply styles to the _checked selector on the Checkbox, it generates styles using a selector with the same specificity as the styles applied by the checkmark.ts recipe in the defaultConfig. As it is defined earlier in the cascade, the styles from the checkmark are taking precedence over my custom styles.

I expect that my custom styles applied on the Checkbox recipe should apply regardless of the styles in the default config.

Link to Reproduction

https://stackblitz.com/edit/a19ahiid-xzdwub9n?file=src%2Fcomponents%2Fui%2Fprovider.tsx

Steps to reproduce

  1. Create a theme with customSystem using defaultConfig as a base.
  2. Add an additional slot recipe for the Checkbox component to apply as a second theme config
  3. Add _checked styles to the control slot on the Checkbox recipe
  4. The custom styles are not applied (but are visible in browser dev-tools)

Chakra UI Version

3.37.0

Browser

Firefox, Chrome, Edge

Operating System

  • macOS
  • Windows
  • Linux

Additional Information

No response

Source: chakra-ui/chakra-ui

View original on GitHubView discussion on GitHub