f740050c2a
* improve TypeScript types for `Fieldset` component * use `fieldset` instead of `div` by default * only apply `role="group"` when not using a native `fieldset` * apply `disabled` attribute This is necessary if we want to make use of the default fieldset tag (which also disables native form elements) * adjust tests reflecting new changes * conditionally apply props based on rendered element * add `useResolvedTag` hook This allows us to compute the `tag` name of a component. We can use a shortcut based on the `props.as` and/or the `DEFAULT_XXX_TAG` of a component. If this is not known/passed, then we compute it based on the `ref` instead which requires an actual re-render. * use `useResolvedTag` hook * reflect change in `Field` related test * update changelog * inline variable
@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: