mintlify / components

UI components for documentation made with React and TailwindCSS.
MIT License
79 stars 12 forks source link

Support Global Sync for `<Tabs>` Components #91

Open KartikSoneji opened 12 months ago

KartikSoneji commented 12 months ago

Support global groups in <Tabs> components to allow switching all tab groups on a page to a particular tab in one click. This can be useful for setup instructions with multiple platforms or libraries that support multiple options. For example, choosing a platform (say Web modular API) in the firebase docs switches all tab components to Web modular API so the user doesn't have to make the same selection over and over again.

This can be implemented with an optional tabs-group prop on the <Tabs> component, and an optional tab-id prop on the <Tab> component that defaults to title prop if the parent <Tabs> component has tabs-group set.