Skip to content

useBell

jsxhook

useBell - A React-like hook for triggering the terminal 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

PropTypeDefaultDescription
initialT | undefinedInitial value
persistbooleanfalsePersist to storage
keystringStorage key
#hook#use-bell