Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/evanminto/headless-signals
Experimental collection of small functions for use as headless components/hooks, implemented with Preact signals
https://github.com/evanminto/headless-signals
component-library headless preact signals
Last synced: about 1 month ago
JSON representation
Experimental collection of small functions for use as headless components/hooks, implemented with Preact signals
- Host: GitHub
- URL: https://github.com/evanminto/headless-signals
- Owner: evanminto
- License: mit
- Created: 2024-05-01T02:39:20.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-05-02T13:19:49.000Z (7 months ago)
- Last Synced: 2024-05-03T00:59:18.646Z (7 months ago)
- Topics: component-library, headless, preact, signals
- Language: JavaScript
- Homepage:
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Headless Signals
Experimental collection of headless components/hooks, implemented with Preact
Signals.## Getting Started
Install with NPM...
```sh
npm install @evanminto/headless-signals
```...or Yarn.
```sh
yarn add @evanminto/headless-signals
```Then import in your JavaScript using any of the following styles:
```js
// Contains all exports
import { clipboard } from '@evanminto/headless-signals';// Contains only full-featured headless UI components
import {
reorderableList,
showPassword,
toggleButton,
} from '@evanminto/headless-signals/components';// Contains only single-responsibility tools/hooks
import {
activeElement,
applyProps,
asyncTask,
browserHistory,
cache,
clipboard,
clock,
deferred,
draggable,
droppable,
eventListener,
focusManagement,
focusTrap,
keyboardListener,
list,
liveSelectors,
mediaQuery,
mousedown,
mutationObserver,
resizeObserver,
toggleValue,
} from '@evanminto/headless-signals/tools';// Contains Preact bindings for many components/tools
import {
useHeadlessSignals,
useModalControl,
useReorderableList,
} 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.