BooleanState

Primitive #14

๐Ÿ” Problem it solves

Many components need a simple on/off state: modal open/closed, toggle on/off, collapsible expanded/collapsed. Writing the same get/set/toggle logic repeatedly is errorโ€‘prone.

โœ… Solution

Centralized boolean state with get(), set(value), toggle(), and a subscribe(callback) method that notifies all listeners when the state changes.

๐Ÿงฉ Used by components

Toggle, Switch, Collapsible, Dialog, AccordionItem, Popover, Tooltip

๐ŸŽฎ Interactive demo