Introduction
The headless components for Svelte.
Bits UI is a collection of headless component primitives that enable you to build your own custom components. They are designed to prioritize accessibility and flexibility, enabling you to add your own styles and behaviors to the components.
Unstyled
Most Bits UI components are unstyled by default, it's up to you to style them however you please. You can use the class
prop to apply your own styles, or use the applied data attributes to target the components across your entire application. Check out the styling section for more information.
Customizable
Each component offers a wide range of props for customizing behavior to fit your needs. Events and callbacks are chainable, allowing you to override the default functionality of the component by simply cancelling the event.
Accessible
Bits UI components have been designed following the W3C ARIA Authoring Practices with the goal of making them usable by as many people as possible. Keyboard navigation, screen reader support, and focus management are all built-in. If you notice an accessibility issue, please raise an issue and we'll address it as soon as possible.
Consistent
Although the components do entirely different things, Bits UI has tried to align the APIs of each component with the same concepts and patterns. This means that once you learn how to use one component, learning similar components should be a quick and easy process. While the docs are always there to help, the goal is to make the components as intuitive as possible.
Credits
Built by @huntabyte. Documentation and example components designed by @pavel_stianko and Bitworks.
Inspiration & Code References
- Melt UI - The powerful builder API that inspired a lot of the internals of Bits UI.
- Radix UI - The incredible headless component APIs that we've taken heavy inspiration and code references from to build Bits UI.
- React Spectrum - A world-class library of headless components, hooks, and utilities that we've taken inspiration from to build the various Date and Time components in Bits UI.