UNPKG

@yamada-ui/use-boolean

Version:

Yamada UI useBoolean custom hook

17 lines (15 loc) 425 B
/** * `useBoolean` is a custom hook used to manage boolean values using `on`, `off`, and `toggle` functions. * * @see Docs https://yamada-ui.com/hooks/use-boolean */ declare const useBoolean: (init?: boolean) => UseBooleanReturn; type UseBooleanReturn = [ flg: boolean, setFlg: { on: () => void; off: () => void; toggle: () => void; } ]; export { type UseBooleanReturn, useBoolean };