State Management

useDisclosure

Manage boolean state for modals, drawers, and other overlay components.

import { useDisclosure } from "saha-ui"

Uses

Manage boolean open/closed state for overlays (modals, drawers, popovers).

Props

NameTypeDescriptionDefault
initialStatebooleanInitial open state.false

Returns

NameDescription
isOpenBoolean current state.
open(), close(), toggle(), setIsOpen(value)State mutation helpers.

Example

const { isOpen, open, close } = useDisclosure(false); open();

Notes

Small, well-scoped helper used across many components.
Saha UI - The Modern React Component Library