f4291112c5b498f1b570be46b73275b4e068261e
* allow className to be a function
Every component that accepts a className should be able to pass in a
function. This function will retrieve the render prop arg for this
component. The function should resolve to a string in the end.
This makes the API a bit nicer if you just need to change the classNames
based on some internal state.
E.g.:
```js
// Before
<Menu.Button as={Fragment}>
{({ open }) => (
<button className={open ? 'font-bold' : 'font-normal'}>
Hello
</button>
)}
</Menu.Button>
// After
<Menu.Button className={({ open }) => open ? 'font-bold' : 'font-normal'}>
Hello
</Menu.Button>
```
* cleanup types
* merge React imports
* update changelog
Headless UI
A set of completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
Packages
| Name | Version | Downloads |
|---|---|---|
@headlessui/react |
||
@headlessui/vue |
Description
Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
Languages
TypeScript
95.3%
Vue
4.3%
JavaScript
0.3%
Shell
0.1%