@evanminto/headless-signals
v0.7.2
Published
Experimental collection of headless components/hooks, implemented with Preact Signals
Readme
Headless Signals
Experimental collection of headless components/hooks, implemented with Preact Signals.
Getting Started
Install with NPM...
npm install @evanminto/headless-signals...or Yarn.
yarn add @evanminto/headless-signalsThen import in your JavaScript:
import {
// Tools
activeElement,
applyProps,
arrayPosition,
asyncTask,
browserHistory,
cache,
clipboard,
clock,
deferred,
draggable,
droppable,
eventListener,
focusManagement,
focusTrap,
keyboardListener,
list,
liveSelectors,
mediaQuery,
mousedown,
mutationObserver,
previousValue,
resizeObserver,
stateMachine,
timer,
toggleValue,
// Components
reorderableList,
showPassword,
toggleButton,
// Preact hooks
useHeadlessSignals,
useModalControl,
useReorderableList,
} from '@evanminto/headless-signals';
// Or import separately
import { toggleValue } from '@evanminto/headless-signals/tools';
import { showPassword } from '@evanminto/headless-signals/components';
import { useHeadlessSignals } from '@evanminto/headless-signals/preact';Future Plans
This project is very much a WIP, and I plan on adding more docs in the future.
As the TC39 Signals proposal continues through the standards process, I will hopefully be able to rewrite this library to use TC39 Signals instead.
