tailwindlabs / tailwindui-issues

Bug fixes and feature request tracking for Tailwind UI.
233 stars 4 forks source link

Radio-group.js has no exported member Radio. #1609

Closed superscriptinc closed 2 months ago

superscriptinc commented 2 months ago

What component (if applicable)

Describe the bug Radio-group.js has no exported member Radio.

To Reproduce Steps to reproduce the behavior:

  1. Create a test component and try to render. See browser error.

Expected behavior Component renders annual and monthly toggle along with pricing table.

Screenshots If applicable, add screenshots to help explain your problem.

Browser/Device (if applicable)

Additional context Add any other context about the problem here.

reinink commented 2 months ago

Hey! Happy to help out here.

I suspect you're using the React version of the components, which require that you have the latest version of Headless UI (v2) installed.

In Headless UI v1 there was no Radio component, which explains why you're seeing that error.

I'd highly recommend upgrading to the latest version of Headless UI:

npm install @headlessui/react@latest

You can find a detailed upgrade guide here:

https://github.com/tailwindlabs/headlessui/releases/tag/%40headlessui%2Freact%40v2.0.0

It looks long, but honestly it's really not that bad of an upgrade — there's a bunch of deprecations and only a few actual breaking changes.

Totally get how this is kind of annoying if you have an existing project based on Tailwind UI components, but we've always felt that it's important for Tailwind UI to use the latest version of our open source libraries.

Hope that makes sense! Let me know if you bump into any other issues 👍