freeCodeCamp / freeCodeCamp/ui
Replace @radix-ui/react-tabs with the Tabs component from Headless UI
- Dominant language
- TypeScript
- Stars
- 75
- Forks
- 37
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
## Description
We are using `@radix-ui/react-tabs` as the base of the Tabs component:
https://github.com/freeCodeCamp/ui/blob/5b612c4b17e9d0aba5b8ddb611ad284ac67d53b5/src/tabs/tabs.tsx#L2
Since we build other components with Headless UI and this library also provides [Tabs](https://headlessui.com/react/tabs), I think we should update our Tabs to use Headless UI, too, to remove an extra dependency.
The Tabs component is using `radix-ui/react-tabs` props interface, so switching to Headless UI and use its props interface would be a breaking change. We might want to take this opportunity to define a prop interface for the component, so that the interface doesn't depend on the external library.
> [!NOTE]
> This change should be made after we have upgraded Headless UI to v2, which requires a React upgrade (#232).
Contributor guide
Assessment
This issue has not been assessed yet.