fuma-nama / fumadocs

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

feat: updateAnchor option for <Tabs /> component #1070

Closed nktnet1 closed 1 week ago

nktnet1 commented 1 week ago

Resolves #1069

Example usage:

<Tabs items={['Javascript', 'Rust', 'C++']} updateAnchor>
  <Tab id="js" value="Javascript">
    Javascript is weird
  </Tab>
  <Tab id="r" value="Rust">
    Rust is fast
  </Tab>
  <Tab id="tab-cpp" value="C++" >
    `Hello World`
  </Tab>
</Tabs>

demo.webm

Albeit potentially a little hacky? Do you have any suggestions @fuma-nama?

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 21345431ecfd903568189a6072ada5149b5a2344

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages | Name | Type | | ------------------- | ----- | | fumadocs-ui | Minor | | fumadocs-openapi | Patch | | fumadocs-core | Minor | | create-fumadocs-app | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

vercel[bot] commented 1 week ago

@nktnet1 is attempting to deploy a commit to the Fuma Team on Vercel.

A member of the Team first needs to authorize it.

nktnet1 commented 1 week ago

I assume we'll also need a docs update the docs for updateAnchor somewhere here - would that be a separate MR?

https://github.com/fuma-nama/fumadocs/blob/403d56b9a4d3513e6166292388064a4ae072d122/apps/docs/content/docs/ui/components/tabs.mdx?plain=1#L59-L82

fuma-nama commented 1 week ago

you could add docs in this PR

vercel[bot] commented 1 week ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
fumadocs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 20, 2024 2:27am
fuma-nama commented 1 week ago

Thanks for contributing!