invalid prop to Combobox component (#3677)
This PR adds the `invalid` prop to the `Combobox` component. This will also expose the `invalid` value as a render prop to the `Combobox.Input` and `Combobox.Button` components. It will also expose the `data-invalid` attribute on these components when the `invalid` prop is set to `true`. ```tsx <Combobox invalid> <Combobox.Input /> <Combobox.Button /> </Combobox> ``` Without `invalid` prop: <img width="916" alt="image" src="https://github.com/user-attachments/assets/2c199691-7b29-450f-89a5-4b84e6704c6a" /> With invalid prop: <img width="913" alt="image" src="https://github.com/user-attachments/assets/4bdde518-39b3-4998-b353-604a818a3c99" /> Notice the `data-invalid` prop on the `<input>` and the `<button>`.
Headless UI
A set of completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.
Documentation
For full documentation, visit headlessui.com.
Installing the latest version
You can install the latest version by using:
npm install @headlessui/react@latestnpm install @headlessui/vue@latest
Installing the insiders version
You can install the insiders version (which points to whatever the latest commit on the main branch is) by using:
npm install @headlessui/react@insidersnpm install @headlessui/vue@insiders
Note: The insiders build doesn't follow semver and therefore doesn't guarantee that the APIs will be the same once they are released.
Packages
| Name | Version | Downloads |
|---|---|---|
@headlessui/react |
||
@headlessui/vue |
||
@headlessui/tailwindcss |
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:
Join the Tailwind CSS Discord Server
Contributing
If you're interested in contributing to Headless UI, please read our contributing docs before submitting a pull request.