useDisclosure
A react hook to manage boolean state with toggle functionality.
Loading...
Install
npx shadcn@latest add https://unlogg.com/r/use-disclosure.json
pnpm dlx shadcn@latest add https://unlogg.com/r/use-disclosure.json
bunx shadcn@latest add https://unlogg.com/r/use-disclosure.json
Notes
API Reference
Parameters
Prop | Type | Default |
---|---|---|
defaultValue? | boolean | false |
Returns
Prop | Type | Default |
---|---|---|
toggle? | () => void | - |
setFalse? | () => void | - |
setTrue? | () => void | - |
setValue? | React.Dispatch<React.SetStateAction<boolean>> | - |
value? | boolean | - |