shadcn.io is not affiliated with official shadcn/ui
Tabs examples · Content
Tabs with Cards for React
Featured, Popular and Recent tabs, each showing a two-column grid of article cards.
A long list of articles is easier to browse in groups. Each tab shows a grid of cards with a badge, a title, a short description and a Learn More button. Use it for posts by category, products by collection or courses by topic.
Preview
Installation
FAQ
How are the three categories set up?
A categories array gives each tab its value, label, badge and two articles. The default is featured, and the group is w-full max-w-2xl.
What is the card layout?
Each panel is grid gap-4 md:grid-cols-2. From the md breakpoint up the two cards sit side by side, and below it they stack. The cards are bordered bg-card blocks.
Which badge does each card use?
Featured cards use the secondary Badge with the text Featured, Popular cards the default badge, and Recent cards the outline badge with the text New.
What does Learn More do?
Nothing yet. It is a small outline Button with no link or handler. Make it a link to the article in your app.
Related
- Basic TabsFour horizontal tabs that switch between
- Tabs with FormsLogin and Register tabs that each hold a
- Standard CardA basic card with a title, a description
- Tabs with TablesAll Users, Active and Inactive tabs, each
- Controlled TabsThree step tabs held in state, with
- Nested TabsProfile, Settings and Billing tabs, each