Measured entry

shadcn-tabs

tabsunclassified

A client-side React tabs primitive shipped as copy-in TypeScript source, with horizontal and vertical layouts plus default and line treatments. It wraps Radix UI for tab behavior and relies on class-variance-authority, the shadcn cn utility, Tailwind utilities, and shadcn theme tokens for styling.

Specimen
Harness screenshot of shadcn-tabs at 375 pixels wide
Harness screenshot at 375 pixels wide. This viewport scrolled sideways.
Harness screenshot of shadcn-tabs at 768 pixels wide
Harness screenshot at 768 pixels wide. No horizontal overflow recorded.
Harness screenshot of shadcn-tabs at 1440 pixels wide
Harness screenshot at 1440 pixels wide. No horizontal overflow recorded.

Measured

Every value below was written by the harness on the run that produced the frames above. None of it is derived from the prose.

Harness measurements recorded for shadcn-tabs
BuildOK
MountOK
Console errors0
Uncaught page errors0
Horizontal overflowflagged at 375
Axe critical0
Axe serious0
Axe moderate0
Axe minor0
Gzip marginal22.4 KB (87.0 KB build, 64.6 KB baseline)
Bare modeFAIL
Provider requiredNO
Demo usedwritten from the component source API

What the harness recorded

BARE BUILD

✗ Build failed in 939ms
error during build:
[vite]: Rollup failed to resolve import "class-variance-authority" from "<sandbox>/src/cut/components/ui/tabs.tsx".

Verdict

A solid fit inside an existing shadcn codebase, with accessible behavior and useful layout variants. It does not mount as a bare component and needs a shadcn-style setup; narrow tab rows also need an explicit responsive overflow strategy.

Use it if

  • You already use shadcn conventions and want tabs that remain editable in your codebase.
  • You need keyboard-aware tab behavior backed by Radix UI.
  • You want both horizontal and vertical layouts or a line-style tab treatment.

Skip it if

  • Your project does not use Tailwind utilities and you do not want to translate the styling.
  • You want an isolated package that works without local aliases, theme tokens, and utility helpers.
  • Your tab labels must fit narrow screens without custom overflow or wrapping work.

Install

Installation record for shadcn-tabs
Declared dependenciesradix-ui
Missing on installnone
Bare installfails once the shadcn-style helpers are removed, so it needs that setup
Providerno provider required in the harness

In a non-shadcn project, add React, radix-ui, class-variance-authority, Tailwind CSS, a compatible cn helper and path alias, plus the referenced shadcn color and state tokens. Mark the file as a client component where the framework requires it, and add responsive overflow or wrapping rules for narrow tab lists.

Source and credit

This page is a review, not a copy. The component source lives with its author and this site does not republish it. Read the license before you use anything.

Author repository

github.com/shadcn-ui/ui
License
MIT
Record published
2026-08-12

Alternatives

Other published entries for the tabs pattern, ordered by what they measured: mounts first, then clean axe scans, then bare-mode passes, then the smaller bundle.