diff --git a/src/mantine-core/src/Checkbox/Checkbox.tsx b/src/mantine-core/src/Checkbox/Checkbox.tsx index 39db1cb245e..a711405b373 100644 --- a/src/mantine-core/src/Checkbox/Checkbox.tsx +++ b/src/mantine-core/src/Checkbox/Checkbox.tsx @@ -136,6 +136,7 @@ export const Checkbox: CheckboxComponent = forwardRef diff --git a/src/mantine-core/src/Radio/Radio.tsx b/src/mantine-core/src/Radio/Radio.tsx index 344eb95930f..74d3fdc29f9 100644 --- a/src/mantine-core/src/Radio/Radio.tsx +++ b/src/mantine-core/src/Radio/Radio.tsx @@ -116,6 +116,7 @@ export const Radio: RadioComponent = forwardRef((p classNames={classNames} styles={styles} unstyled={unstyled} + data-checked={contextProps.checked || undefined} {...systemStyles} {...wrapperProps} > diff --git a/src/mantine-core/src/Switch/Switch.tsx b/src/mantine-core/src/Switch/Switch.tsx index 7afbc38aab4..92bb8a4b953 100644 --- a/src/mantine-core/src/Switch/Switch.tsx +++ b/src/mantine-core/src/Switch/Switch.tsx @@ -134,6 +134,7 @@ export const Switch: SwitchComponent = forwardRef classNames={classNames} styles={styles} unstyled={unstyled} + data-checked={contextProps.checked || undefined} {...systemStyles} {...wrapperProps} >