BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/tdds/tabs

Tabs

tdds/tabs
FreeComponent

Tabs component with TDDS variant featuring top border accents

Install it

npx shadcn@latest add https://raw.githubusercontent.com/gjohnsx/ttb-label-verification/main/tdds-registry/public/r/tabs.json

Source

registry/ui/tabs.tsxraw.githubusercontent.com/gjohnsx/ttb-label-verification/main/tdds-registry/public/r/tabs.json
1"use client"
2
3import * as React from "react"
4import { cva, type VariantProps } from "class-variance-authority"
5import { Tabs as TabsPrimitive } from "radix-ui"
6
7import { cn } from "@/lib/utils"
8
9function Tabs({
10 className,
11 orientation = "horizontal",
12 ...props
13}: React.ComponentProps<typeof TabsPrimitive.Root>) {
14 return (
15 <TabsPrimitive.Root
16 data-slot="tabs"
17 data-orientation={orientation}
18 className={cn(
19 "gap-2 group/tabs flex data-[orientation=horizontal]:flex-col",
20 className
21 )}
22 {...props}
23 />
24 )
25}
26
27const tabsListVariants = cva(
28 "rounded-lg p-[3px] group-data-horizontal/tabs:h-9 data-[variant=line]:rounded-none data-[variant=uswds]:rounded-none group/tabs-list text-muted-foreground inline-flex w-fit items-center justify-center group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col",
29 {
30 variants: {
31 variant: {
32 default: "bg-muted",
33 line: "gap-1 bg-transparent",
34 uswds: "w-full justify-start h-auto items-end relative gap-0 bg-transparent p-0 before:absolute before:inset-x-0 before:bottom-0 before:h-px before:bg-treasury-primary",
35 },
36 },
37 defaultVariants: {
38 variant: "default",
39 },
40 }
41)
42
43function TabsList({
44 className,
45 variant = "default",
46 ...props
47}: React.ComponentProps<typeof TabsPrimitive.List> &
48 VariantProps<typeof tabsListVariants>) {
49 return (
50 <TabsPrimitive.List
51 data-slot="tabs-list"
52 data-variant={variant}
53 className={cn(tabsListVariants({ variant }), className)}
54 {...props}
55 />
56 )
57}
58
59function TabsTrigger({
60 className,
61 ...props
62}: React.ComponentProps<typeof TabsPrimitive.Trigger>) {
63 return (
64 <TabsPrimitive.Trigger
65 data-slot="tabs-trigger"
66 className={cn(
67// … truncated

What it pulls in

npm packages

  • class-variance-authority
  • radix-ui

Other registry items

  • utils

Files it writes

  • registry/ui/tabs.tsx

Facts

Registry
tdds
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

icy-river-012b1601e.6.azurestaticapps.net gjohnsx/ttb-label-verification on GitHub Raw registry item This item as JSON

More from tdds

All 43 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordiontddsComponentsFree2 deps
AlertalerttddsComponentsFree1 dep
Alert Dialogalert-dialogtddsComponentsFree1 dep
AvataravatartddsComponentsFree1 dep
BadgebadgetddsComponentsFree1 dep
BreadcrumbbreadcrumbtddsComponentsFree2 deps
ButtonbuttontddsComponentsFree2 deps
Button Groupbutton-grouptddsComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex