Components
Loading preview...
A control that allows the user to toggle between checked and not checked.
npx shadcn@latest add https://21st.dev/r/sean0205/checkboximport { useId, useState } from 'react';
import { Checkbox } from '@/components/ui/checkbox';
const DemoOne = () => {
const [checked, setChecked] = useState<boolean>(true);
return (
<div className="flex items-center space-x-2 justify-center h-screen w-full">
<Checkbox checked={checked}
onCheckedChange={(value) => setChecked(!!value)}/>
</div>
);
};
export { DemoOne };