BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/adn-ui/tabs

Tabs

adn-ui/tabs
FreeComponent

A component for toggling between related panels on the same page.

Live preview

live · rendered by the registry
Rendered by adn-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.awaiden.com/r/tabs.json

Source

src/components/ui/tabs/tabs.tsxui.awaiden.com/r/tabs.json
1"use client";
2
3import "./tabs.css";
4import { Tabs as BaseTabs } from "@base-ui/react/tabs";
5import type React from "react";
6import { cn } from "tailwind-variants";
7
8import { TabsContext, useTabsContext } from "./tabs.context";
9import { tabsVariants, type TabsVariants } from "./tabs.variants";
10
11export type TabsProps = TabsVariants & React.ComponentProps<typeof BaseTabs.Root>;
12
13export const TabsRoot = ({ children, className, variant, size, ...props }: TabsProps) => {
14 const slots = tabsVariants({ variant, size });
15
16 return (
17 <TabsContext.Provider value={{ slots }}>
18 <BaseTabs.Root className={cn(slots.root(), className)} {...props}>
19 {children}
20 </BaseTabs.Root>
21 </TabsContext.Provider>
22 );
23};
24
25export type TabsListProps = React.ComponentProps<typeof BaseTabs.List>;
26
27export const TabsList = ({ className, ...props }: TabsListProps) => {
28 const { slots } = useTabsContext();
29 return <BaseTabs.List className={cn(slots.list(), className)} {...props} />;
30};
31
32export type TabsTabProps = React.ComponentProps<typeof BaseTabs.Tab>;
33
34export const TabsTab = ({ className, ...props }: TabsTabProps) => {
35 const { slots } = useTabsContext();
36 return <BaseTabs.Tab className={cn(slots.tab(), className)} {...props} />;
37};
38
39export type TabsIndicatorProps = React.ComponentProps<typeof BaseTabs.Indicator>;
40
41export const TabsIndicator = ({ className, ...props }: TabsIndicatorProps) => {
42 const { slots } = useTabsContext();
43 return <BaseTabs.Indicator className={cn(slots.indicator(), className)} {...props} />;
44};
45
46export type TabsPanelProps = React.ComponentProps<typeof BaseTabs.Panel>;
47
48export const TabsPanel = ({ className, ...props }: TabsPanelProps) => {
49 const { slots } = useTabsContext();
50 return <BaseTabs.Panel className={cn(slots.panel(), className)} {...props} />;
51};

What it pulls in

npm packages

  • @base-ui/react
  • tailwind-variants

Files it writes

  • src/components/ui/tabs/tabs.tsx
  • src/components/ui/tabs/tabs.variants.ts
  • src/components/ui/tabs/tabs.context.ts
  • src/components/ui/tabs/tabs.css
  • src/components/ui/tabs/index.ts

Facts

Registry
adn-ui
Type
registry:ui
Access
Free
Files written
5
Licence
MIT
First indexed
2026-08-04
Last confirmed
today

Go to the source

Docs on adn-ui ui.awaiden.com awaiden/adn-ui on GitHub Raw registry item This item as JSON

More from adn-ui

All 46 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionadn-uiComponentsFree2 deps · 5 files
Alert Dialogalert-dialogadn-uiComponentsFree2 deps · 5 files
Aspect Ratioaspect-ratioadn-uiComponentsFree1 dep · 5 files
Autocompleteautocompleteadn-uiComponentsFree2 deps · 5 files
Avataravataradn-uiComponentsFree2 deps · 5 files
Badgebadgeadn-uiComponentsFree1 dep · 5 files
Breadcrumbbreadcrumbadn-uiComponentsFree1 dep · 5 files
Buttonbuttonadn-uiComponentsFree1 dep · 4 files
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