Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/CaptainCodeman/svelte-headlessui
HeadlessUI components for Svelte
https://github.com/CaptainCodeman/svelte-headlessui
autocomplete button combobox dialog disclosure dropdown headless listbox menu modal popover radio renderless select svelte svelte-components tabs tailwind toggle transition
Last synced: 3 months ago
JSON representation
HeadlessUI components for Svelte
- Host: GitHub
- URL: https://github.com/CaptainCodeman/svelte-headlessui
- Owner: CaptainCodeman
- License: mit
- Created: 2022-08-10T23:40:58.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-25T15:23:28.000Z (4 months ago)
- Last Synced: 2024-07-27T09:44:19.685Z (3 months ago)
- Topics: autocomplete, button, combobox, dialog, disclosure, dropdown, headless, listbox, menu, modal, popover, radio, renderless, select, svelte, svelte-components, tabs, tailwind, toggle, transition
- Language: TypeScript
- Homepage: https://captaincodeman.github.io/svelte-headlessui/
- Size: 5.95 MB
- Stars: 529
- Watchers: 10
- Forks: 25
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: license
Awesome Lists containing this project
README
![minified](https://img.shields.io/bundlephobia/min/svelte-headlessui/0.0.25?style=for-the-badge)
![minified + zipped](https://img.shields.io/bundlephobia/minzip/svelte-headlessui/0.0.25?style=for-the-badge)# Svelte-HeadlessUI
![Svelte Headless-UI](https://raw.githubusercontent.com/CaptainCodeman/svelte-headlessui/8e312a2fc243e811d5d9b50e78457e10f650df49/packages/lib/static/svelte-headlessui-solid-text.svg?sanitize=true)
`svelte-headlessui` is an unofficial implementation of [Tailwind HeadlessUI](https://headlessui.com/) for [Svelte](https://svelte.dev/). Just like the official implementation, they are:
- ✅ Completely unstyled
- ✅ Fully WIA-ARIA accessible UI components
- ✅ Fully typed with Typescript
- ✅ Designed to integrate beautifully with Tailwind CSSBut also:
- ✅ Designed to integrate beautifully with Svelte and SvelteKit
- ✅ Less than 14kB minified / 4kB minified gzipped## BREAKING CHANGE (v0.0.39)
The latest 0.0.39 release switches to using "change" instead of "select" as the event fired when the selected item changes for semantic correctness and to better match native inputs. Be sure to change listeners from `on:select` to `on:change`!
## Installation
Install using your package manager of choice, e.g.
pnpm install svelte-headlessui
Import the appropriate `create...` factory method in your component and use the custom store it returns to manage your component state and attach `use:action` behaviors to your elements.
See the individual component pages for usage examples.
## Alternative
You may be interested in evaluating [@rgossiaux/svelte-headlessui](https://svelte-headlessui.goss.io). This package aligns closer to the official components in it's approach although I believe that approach (driven by React / Vue) contributes to the [larger size of 173kB minified / 29kB minified + gzipped](https://bundlephobia.com/package/@rgossiaux/[email protected]).
## Logo
Special thanks to [Shoob](https://github.com/hshoob) for the logo!