Files
react-test/docs/data/joy/components/checkbox/FocusCheckbox.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
686 B
JavaScript
Raw Normal View History

2025-12-12 14:26:25 +09:00
import Box from '@mui/joy/Box';
import Checkbox, { checkboxClasses } from '@mui/joy/Checkbox';
export default function FocusCheckbox() {
return (
<Box sx={{ display: 'flex', gap: 3 }}>
<Checkbox
label="Fully wrapped"
defaultChecked
// to demonstrate the focus outline
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
/>
<Checkbox
label="Input wrapped"
defaultChecked
sx={{ [`& > .${checkboxClasses.checkbox}`]: { position: 'relative' } }}
// to demonstrate the focus outline
slotProps={{ action: { className: checkboxClasses.focusVisible } }}
/>
</Box>
);
}