useBell
jsxhook
useBell - A React-like hook for triggering the terminal bell
Terminal
$termuijs render use-bell
Installation
$ bunx termuijs add use-bell
Copies the source into src/components/use-bell/ and installs @termuijs/core, @termuijs/jsx.
Usage
ts
import { useBell } from '@termuijs/jsx'ts
const { value, set, reset } = useBell({
initial: undefined,
})API Reference
useBell
| Prop | Type | Default | Description |
|---|---|---|---|
initial | T | undefined | — | Initial value |
persist | boolean | false | Persist to storage |
key | string | — | Storage key |