Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tabs component #674

Merged
merged 6 commits into from
Jul 13, 2021
Merged

Tabs component #674

merged 6 commits into from
Jul 13, 2021

Conversation

RobinMalfait
Copy link
Member

@RobinMalfait RobinMalfait commented Jul 7, 2021

This PR adds a new Tabs component. Here is how you can use it:

React:

<Tabs>
  <Tabs.List>
    <Tabs.Tab>Tab 1</Tabs.Tab>
    <Tabs.Tab>Tab 2</Tabs.Tab>
    <Tabs.Tab>Tab 3</Tabs.Tab>
  </Tabs.List>

  <Tabs.Panels>
    <Tabs.Panel>Content 1</Tabs.Panel>
    <Tabs.Panel>Content 2</Tabs.Panel>
    <Tabs.Panel>Content 3</Tabs.Panel>
  </Tabs.Panels>
</Tabs>

Vue:

<Tabs>
  <TabsList>
    <TabsTab>Tab 1</TabsTab>
    <TabsTab>Tab 2</TabsTab>
    <TabsTab>Tab 3</TabsTab>
  </TabsList>

  <TabsPanels>
    <TabsPanel>Content 1</TabsPanel>
    <TabsPanel>Content 2</TabsPanel>
    <TabsPanel>Content 3</TabsPanel>
  </TabsPanels>
</Tabs>

@vercel
Copy link

vercel bot commented Jul 7, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployments, click below or on the icon next to each commit.

headlessui-react – ./packages/@headlessui-react

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-react/78qykE9zoxqqDb32xpkksabvXcej
✅ Preview: https://headlessui-react-git-tabs-component-tailwindlabs.vercel.app

headlessui-vue – ./packages/@headlessui-vue

🔍 Inspect: https://vercel.com/tailwindlabs/headlessui-vue/7uGN8qDsWNhQ2gzgxb3pxEamgZG4
✅ Preview: https://headlessui-vue-git-tabs-component-tailwindlabs.vercel.app

@preetjdp
Copy link

@RobinMalfait Is there a way to install this as a package (since its merged into develop)

I tried searching on npm for a beta or an alpha, could not find any.

@CR1AT0RS
Copy link

@RobinMalfait This is awesome!

@preetjdp you can install it via: npm install @headlessui/react@dev. This will install the latest development branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants