c0f0d43383
* add reset button to form example * refactor React Listbox This splitsup the raw `[state, dispatch]` to separate `useActions` and `useData` hooks. This allows us to make the actions themselves simpler and include logic that doesn't really belong in the reducer itself. This also allows us to expose data via the `useData` hook that doesn't belong in the state exposed from the `useReducer` hook. E.g.: we used to store a `propsRef` from the root `Listbox`, and update the ref with the new props in a `useEffect`. Now, we will just expose that information directly via the `useData` hook. This simplifies the code, removes useEffect's and so on. * refactor Tabs, ensure function reference stays the same If the `isControlled` value changes, then the references to all the functions changed. Now they won't because of the `useEvent` hooks. * type the actions abg similar to how we type the data bag * refactor RadioGroup to use useData/useActions hooks * reset Listbox to defaultValue on form reset * reset Combobox to defaultValue on form reset * reset RadioGroup to defaultValue on form reset * reset Switch to defaultChecked on form reset * port combinations/form playground example to Vue * update changelog
@headlessui/react
A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.
Installation
npm install @headlessui/react
Documentation
For full documentation, visit headlessui.dev.
Community
For help, discussion about best practices, or any other conversation that would benefit from being searchable:
For casual chit-chat with others using the library: