|
2 | 2 | title: Qwik UI | Introduction
|
3 | 3 | ---
|
4 | 4 |
|
5 |
| -import headlessHero from '/public/images/qwik-ui-headless-hero.webp'; |
6 |
| -import { Accordion } from '@qwik-ui/styled'; |
| 5 | +import { FAQ } from '~/components/faq/faq'; |
| 6 | +import { ConfettiButton } from '../install/confetti-button'; |
| 7 | +import autocompleteImg from '../../../../../public/images/autocomplete.png'; |
7 | 8 |
|
8 | 9 | # Headless kit
|
9 | 10 |
|
10 |
| -Taking inspiration from popular headless libraries such as [Headless UI](https://headlessui.com/), [Radix UI](https://www.radix-ui.com/primitives/docs/components/accordion), [React Aria](https://react-spectrum.adobe.com/react-aria/components.html), [Kobalte](https://kobalte.dev/docs/core/overview/introduction), and [Melt UI](https://melt-ui.com/docs/builders/accordion), the headless kit is a library of completely unstyled, accessible, and resumable components with built-in structure, behavior, and state. |
11 |
| -You can use it to build your design system from scratch with any of the tools you want, or simply use the docs as a reference to the components API if you're using the styled kit. |
| 11 | +Qwik UI is a tool to help you build better design systems. It includes components with **no default styles** and a [styled kit](../../styled/introduction/) with configurable presets. Both are fully customizable and accessible. |
| 12 | + |
| 13 | +You are currently exploring the headless kit, which manages the essential structure, behavior, and state of advanced UI components. It also happens to be the world's fastest UI library, squeezing out every bit of performance. _(Like lemonade from lemons that had a run-in with a steamroller.)_ 🥤 |
12 | 14 |
|
13 | 15 | <Note status="warning">
|
14 |
| - Qwik UI is in its **beta** phase - it's like a roller coaster, thrilling and full of |
15 |
| - surprises! Expect new features and some breaking changes until we reach version 1.0. So, |
16 |
| - buckle up and enjoy the ride. 🏍️ |
| 16 | + Qwik UI is currently in its **beta** phase. We appreciate your support and patience as |
| 17 | + we continue to add new features and make improvements. Expect some breaking changes |
| 18 | + until we reach version 1.0. |
17 | 19 | </Note>
|
18 | 20 |
|
19 |
| -## Vision |
20 |
| - |
21 |
| -In 2024, developers should not have to recreate the same [WAI-Aria Patterns](https://www.w3.org/WAI/ARIA/apg/patterns/) from scratch. Building custom components is challenging, and developers shouldn't need to reinvent common UI patterns. |
22 |
| - |
23 |
| -Our aim is to ensure Qwik UI is not just an effective, but also a simple, reliable, and flexible choice for developing applications. |
24 |
| - |
25 |
| -Qwik UI Headless is optimized to squeeze every possible ounce of performance out of Qwik _(Like lemonade from lemons that had a run-in with a steamroller.)_ 🥤 |
26 |
| - |
27 |
| -## Why Qwik UI Headless? |
28 |
| - |
29 |
| -### The client and the server |
30 |
| - |
31 |
| -Like Qwik itself, Qwik UI is super performant because it renders everything it can on the server |
32 |
| - |
33 |
| -Unlike many other solutions that focus solely on client-side components, Qwik UI takes advantage of the server, the client, and the concept of resumability. |
34 |
| - |
35 |
| -This means that Qwik UI can operate with any meta-framework that supports Qwik, including the full framework benefits. At the time of writing, that includes [Qwik City](https://qwik.builder.io/docs/qwikcity/) and [Astro](https://astro.build/). |
36 |
| - |
37 |
| -### Embracing native first |
38 |
| - |
39 |
| -Qwik values HTML as the source of truth, and this principle extends to Qwik UI components. We appreciate and adopt the excellent work done by the [Open UI Group](https://open-ui.org/) when appropriate. |
40 |
| - |
41 |
| -This approach also encompasses future native APIs. Users of Qwik UI might find themselves using components that can be gradually adopted into the native specification. This implies that, eventually, these custom patterns might not need any JavaScript. |
42 |
| - |
43 |
| -> For instance, [Qwik UI's popover component](https://github.com/qwikifiers/qwik-ui/pull/445) uses the native Popover API on supported browsers. The Anchor API is also incrementally adoptable. |
| 21 | +## It's fast, like really fast |
44 | 22 |
|
45 |
| -Thanks to resumability, we do less work because there are less components to execute. With Qwik UI we build on top of that, providing the same functionality with less code needed to prefetch in the first place. |
| 23 | +The claim of being the world's fastest UI library is genuine, not just marketing hype. In Qwik UI, every component starts as **lightweight HTML** and activates smaller pieces upon **user interaction**. Each event is handled independently, without affecting the entire component. |
46 | 24 |
|
47 |
| -## Features |
| 25 | +## Accessibility |
48 | 26 |
|
49 |
| -### Unstyled |
| 27 | +Components in Qwik UI follow the [WAI-ARIA Design Patterns](https://www.w3.org/WAI/ARIA/apg/patterns/) when possible. The project manages ARIA attributes, focus management, and keyboard handling. |
50 | 28 |
|
51 |
| -Qwik UI is a headless library, and comes with zero or very minimal styling. This means the design of your components are completely customizable. |
| 29 | +However, following these guidelines alone does not guarantee full accessibility. The headless kit tests with assistive technologies to ensure that people with disabilities can fully use your applications. |
52 | 30 |
|
53 |
| -<CodeSnippet name="headless-jsx" /> |
| 31 | +## Bring your own styles |
54 | 32 |
|
55 |
| -This is in contrast to styled libraries such as Bootstrap or Material UI, where [styles often need to be stripped](https://www.smashingmagazine.com/2022/05/you-dont-need-ui-framework/) in order to be custom. |
| 33 | +Out of the box, components ship with zero or necessary behavioral styles, giving you complete control over your design. You can style them using any solution. |
56 | 34 |
|
57 |
| -<CodeSnippet name="headless-css.css" /> |
58 |
| - |
59 |
| -### Accessible at its core |
60 |
| - |
61 |
| -Everyone should have equal access to information and functionality on the web. Every Qwik UI component is designed to follow the [WCAG Guidelines](https://www.w3.org/WAI/standards-guidelines/wcag/). |
62 |
| - |
63 |
| -However, it's a common misconception that meeting WCAG success criteria guarantees full accessibility of your components. Unfortunately, this is not the case. |
64 |
| - |
65 |
| -The ultimate measure of your components' accessibility is user testing. This aspect, often overlooked in other projects, is a high priority for us. |
| 35 | +<FeatureList |
| 36 | + features={['Vanilla CSS', 'SASS and PostCSS', 'CSS-in-JS', 'Whatever you want!']} |
| 37 | +/> |
66 | 38 |
|
67 |
| -### Developer Experience that matches UX |
| 39 | +<ConfettiButton intro /> |
68 | 40 |
|
69 |
| -Many libraries tout their excellent Developer Experience (DX), but this doesn't necessarily translate into a superior User Experience (UX). |
| 41 | +## Environment agnostic |
70 | 42 |
|
71 |
| -Conversely, some packages offer great UX, but fall short when it comes to DX. |
| 43 | +Whether you're building an _SSG_ marketing page, _SSR_ e-commerce site, or _CSR_ dashboard, Qwik UI knows when each function should run on the server or the client for you. |
72 | 44 |
|
73 |
| -One of the benefits of Qwik is its ability to create performant applications without compromising on DX. Our goal is to extend this same balance of performance and ease-of-use to those utilizing Qwik UI components. |
| 45 | +## Developer experience |
74 | 46 |
|
75 |
| -#### Some examples being: |
| 47 | +Our goal is to provide the **best developer experience**. Qwik UI offers fully-typed, discoverable, and composable components. |
76 | 48 |
|
77 |
| -<FeatureList |
78 |
| - features={[ |
79 |
| - 'TypeScript support', |
80 |
| - 'Custom Signal Binds', |
81 |
| - 'Automatic entry and exit animations across browsers', |
82 |
| - 'Works across environments / microfrontends', |
83 |
| - 'Automatic performance optimization', |
84 |
| - ]} |
| 49 | +<img |
| 50 | + src={autocompleteImg} |
| 51 | + class="h-60 rounded-sm object-cover object-left px-2 md:h-[revert]" |
| 52 | + width="1920" |
| 53 | + height="600" |
85 | 54 | />
|
86 | 55 |
|
87 | 56 | ## FAQ
|
88 | 57 |
|
89 |
| -<Accordion.Root> |
90 |
| - <Accordion.Item> |
91 |
| - <Accordion.Trigger> |
92 |
| - What kind of support or resources are available if I encounter issues with Qwik UI? |
93 |
| - </Accordion.Trigger> |
94 |
| - <Accordion.Content> |
95 |
| - If you stumble into any problems, [create an |
96 |
| - issue](https://github.com/qwikifiers/qwik-ui/issues) on the Qwik UI repository. We |
97 |
| - also have a [discord community](https://discord.gg/PVWUUejrez) with a Qwik UI |
98 |
| - channel where you can raise any concerns, propose ideas, or chat all things Qwik UI |
99 |
| - 😊 |
100 |
| - </Accordion.Content> |
101 |
| - </Accordion.Item> |
102 |
| - <Accordion.Item> |
103 |
| - <Accordion.Trigger>How can I contribute to the project?</Accordion.Trigger> |
104 |
| - <Accordion.Content> |
105 |
| - We provide a [contributing](/docs/headless/contributing) guide to help get familiar |
106 |
| - with the repository. Additionally, we offer a quick start [setup |
107 |
| - guide](https://github.com/qwikifiers/qwik-ui/blob/main/CONTRIBUTING.md) and a |
108 |
| - section dedicated to advanced resources below the Components navigation. |
109 |
| - </Accordion.Content> |
110 |
| - </Accordion.Item> |
111 |
| - <Accordion.Item> |
112 |
| - <Accordion.Trigger> |
113 |
| - How can I migrate my existing application to use Qwik UI? |
114 |
| - </Accordion.Trigger> |
115 |
| - <Accordion.Content> |
116 |
| - If you're using `Qwik-React`, `Qwik-Angular`, `@qwikdev/astro`, we suggest |
117 |
| - incrementally adding Qwik UI components to your application. Qwik, built as a |
118 |
| - microfrontend, allows you to incrementally integrate Qwik UI components into your |
119 |
| - existing application. This approach reduces migration risk and complexity, letting |
120 |
| - you leverage Qwik UI's benefits at your own pace. |
121 |
| - </Accordion.Content> |
122 |
| - </Accordion.Item> |
123 |
| -</Accordion.Root> |
| 58 | +<FAQ /> |
124 | 59 |
|
125 | 60 | ## Credits
|
126 | 61 |
|
127 |
| -We strongly believe in having a [learner's mindset](https://www.jakeyou.com/blog/learners-mindset-how-to-be-a-learner), and as such, we've drawn inspiration from a multitude of projects, learning from their successes and challenges. |
128 |
| - |
129 |
| -Qwik UI's development has been shaped by the following remarkable projects: |
| 62 | +We believe in a _learner's mindset_ and have drawn inspiration from many projects, learning from their successes and challenges. |
130 | 63 |
|
131 |
| -- [Radix UI](https://www.radix-ui.com/) |
132 | 64 | - [Kobalte](https://kobalte.dev/docs/core/overview/introduction)
|
133 |
| -- [Melt UI](https://www.melt-ui.com/docs/introduction) |
134 | 65 | - [React Aria](https://react-spectrum.adobe.com/react-aria/)
|
135 |
| -- [Reach UI](https://reach.tech/) |
| 66 | +- [Melt UI](https://www.melt-ui.com/docs/introduction) |
| 67 | +- [Radix UI](https://www.radix-ui.com/) |
| 68 | +- [Ariakit](https://ariakit.org/) |
0 commit comments