fuma-nama / fumadocs

The beautiful docs framework with Next.js. Alternative to Nextra
https://fumadocs.vercel.app
MIT License
1.86k stars 113 forks source link

Anchor Ids for Tabs #943

Closed RaniJiang closed 4 weeks ago

RaniJiang commented 1 month ago

What problem will this feature address?

Sometimes, I'd like to link users to a specific tab that is not the default. E.g. placing form in each tab and asking users to fill out a specific form.

image

Describe the solution you'd like

Similar to the Accordion I'd like to be able to use id to link to specific tabs as openned. E.g. "/page#tab1" would open the tab with id "tab1".

Describe alternatives you've considered

Open to other suggestions!

Additional context

No response

fuma-nama commented 1 month ago

Will be supported on v14

nktnet1 commented 3 weeks ago

Docs in v14: https://fumadocs.vercel.app/docs/ui/components/tabs#link-to-tab

image


Hi @fuma-nama,

Would it be possible to add a "copy link" feature similar to the Accordion component?

image

Or were there some challenges with this approach?

fuma-nama commented 3 weeks ago

You can use accordions which should be a better choice than Tabs, another feature request and PR submission is welcome