Skip to content
HomeCobalt

Tabs

Switches between views of one thing in place, with one list of tabs and one panel showing at a time.

Examples

Three views of one fund on the page tint, the white thumb on the grey track marking the open one.
  • Net assets$4.8B
  • Expense ratio0.42%
  • Holdings186
More tabs than roomIn a narrow side panel, four views of a booking do not fit, so the list scrolls sideways; it opens on Payments, the last tab, already in view, with a fade at the edge that has more.
Deposit
Paid Oct 2
Balance
Due Oct 23
In a cardThe line variant inside a card, so the card keeps one fill, switching between two views of a paper.
Liquidity in open-end bond funds
Working paper, March 2026.

Bond funds that promise daily redemptions hold more cash after a run, and sell their most liquid bonds first when they do not.

Variants

Variant

  • Harbour Capital
  • Northgate Partners
  • Calder Investment Management
LineNo track, the 2px ink line under the active tab, for tabs inside a card or under a heading.

Orientation

  • NameAna Lima
  • Emailana@example.com
  • Time zoneEurope/Lisbon
VerticalStacked at the start of a settings page from 640px, and across the top below it.

States

  • Northgate Treasury 20314.2%
  • Calder Global Equity3.1%
DisabledA view that is not available yet keeps its place, skipped by the arrows, with its panel kept for later.

Usage

Use it when

  • One object has 2 to 4 views and you switch between them in place: overview, activity, settings.
  • The views share one heading and one URL, and switching loses nothing.

Use something else when

  • The tabs change the URL or load another page. Use NavTabs or Nav instead.
  • The choice is a value, not a view, such as a range or a sort. Use SegmentedControl instead.
  • There are more than 4 views at 390px, or the labels run past 8 characters. Use Select for the view, or split the page, instead. A list that still runs out of room, in a narrow panel or a long translation, scrolls sideways with the active tab in view.
  • The views are steps in order. Use Button for each step, with one panel per step, instead, so the next step is an action.

Rules

General

Content

Avoid

Limits

Install

npx shadcn@latest add https://kaanarici.com/r/cobalt/tabs.json
import { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants } from "@/components/cobalt/ui/tabs"