Files
headlessui/packages/@headlessui-react
Robin Malfait e40c66cec2 Ensure that you can use Transition Child components in more scenario's (#503)
* ensure that you can use Transition Child components

When you are using the implicit variants of the components, for example
when you are using a Transition component inside a Menu component then
it might look weird in Vue.

The Vue code could look like this:

```
<Menu>
  <TransitionRoot>
    <MenuItems>...</MenuItems>
  </TransitionRoot>
<Menu>
```

However, `TransitionRoot` doesn't make much sense here because it sits
in the middle of 2 components, and it is also not controlled by an
explicit `show` prop.

This commit will allows you to use a `TransitionChild` instead (in fact,
both work).

We basically now do a few things, when you are using a TransitionChild:

- Do we have a parent `TransitionRoot`? Yes -> Use it
- Do we have an open closed state? Yes -> Render a TransitionRoot in
  between behind the scenes.
- Throw the error we were throwing before!

* update changelog
2021-05-10 18:36:49 +02:00
..
2021-05-03 13:11:19 +02:00
2020-09-16 18:20:49 +02:00
2020-09-16 18:20:49 +02:00
2021-05-10 12:08:05 +02:00
2021-04-26 15:44:10 +02:00
2020-09-20 21:29:56 +02:00

@headlessui/react

A set of completely unstyled, fully accessible UI components for React, designed to integrate beautifully with Tailwind CSS.

Total Downloads Latest Release License

Installation

# npm
npm install @headlessui/react

# Yarn
yarn add @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:

Discuss Headless UI on GitHub

For casual chit-chat with others using the library:

Join the Tailwind CSS Discord Server