BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/solid-ui/tabs

Tabs

solid-ui/tabs
FreeComponent

A tabs component

Live preview

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

Install it

npx shadcn@latest add https://www.solid-ui.com/r/tabs.json

Source

src/registry/ui/tabs.tsxwww.solid-ui.com/r/tabs.json
1import type { ValidComponent } from "solid-js"
2import { splitProps } from "solid-js"
3
4import type { PolymorphicProps } from "@kobalte/core/polymorphic"
5import * as TabsPrimitive from "@kobalte/core/tabs"
6
7import { cn } from "~/lib/utils"
8
9const Tabs = TabsPrimitive.Root
10
11type TabsListProps<T extends ValidComponent = "div"> = TabsPrimitive.TabsListProps<T> & {
12 class?: string | undefined
13}
14
15const TabsList = <T extends ValidComponent = "div">(
16 props: PolymorphicProps<T, TabsListProps<T>>
17) => {
18 const [local, others] = splitProps(props as TabsListProps, ["class"])
19 return (
20 <TabsPrimitive.List
21 class={cn(
22 "inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",
23 local.class
24 )}
25 {...others}
26 />
27 )
28}
29
30type TabsTriggerProps<T extends ValidComponent = "button"> = TabsPrimitive.TabsTriggerProps<T> & {
31 class?: string | undefined
32}
33
34const TabsTrigger = <T extends ValidComponent = "button">(
35 props: PolymorphicProps<T, TabsTriggerProps<T>>
36) => {
37 const [local, others] = splitProps(props as TabsTriggerProps, ["class"])
38 return (
39 <TabsPrimitive.Trigger
40 class={cn(
41 "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[selected]:bg-background data-[selected]:text-foreground data-[selected]:shadow-sm",
42 local.class
43 )}
44 {...others}
45 />
46 )
47}
48
49type TabsContentProps<T extends ValidComponent = "div"> = TabsPrimitive.TabsContentProps<T> & {
50 class?: string | undefined
51}
52
53const TabsContent = <T extends ValidComponent = "div">(
54 props: PolymorphicProps<T, TabsContentProps<T>>
55) => {
56 const [local, others] = splitProps(props as TabsContentProps, ["class"])
57 return (
58 <TabsPrimitive.Content
59 class={cn(
60 "mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
61 local.class
62 )}
63 {...others}
64 />
65 )
66}
67
68type TabsIndicatorProps<T extends ValidComponent = "div"> = TabsPrimitive.TabsIndicatorProps<T> & {
69 class?: string | undefined
70}
71
72const TabsIndicator = <T extends ValidComponent = "div">(
73 props: PolymorphicProps<T, TabsIndicatorProps<T>>
74) => {
75// … truncated

What it pulls in

npm packages

  • solid-js
  • @kobalte/core

Files it writes

  • src/registry/ui/tabs.tsx

Facts

Registry
solid-ui
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on solid-ui www.solid-ui.com stefan-karger/solid-ui on GitHub Raw registry item This item as JSON

More from solid-ui

All 55 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Accordionaccordionsolid-uiComponentsFree2 deps
Alertalertsolid-uiComponentsFree3 deps
Alert Dialogalert-dialogsolid-uiComponentsFree2 deps
Aspect Ratioaspect-ratiosolid-uiComponentsFree1 dep
Avataravatarsolid-uiComponentsFree2 deps
Badgebadgesolid-uiComponentsFree2 deps
Badge Deltabadge-deltasolid-uiComponentsFree2 deps
Bar Listbar-listsolid-uiComponentsFree1 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