tabs
shipbase-ui/tabsFreeComponent
shipbase/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/shipbase/ui/next/apps/www/public/r/react/tabs.jsonSource
1"use client"23import * as React from "react"45import { Tabs as TabsPrimitive } from "@ark-ui/react/tabs"67import { cn } from "@/lib/utils"89const Tabs = React.forwardRef<10 React.ElementRef<typeof TabsPrimitive.Root>,11 TabsPrimitive.RootProps12>(({ className, ...props }, ref) => (13 <TabsPrimitive.Root14 ref={ref}15 className={cn("flex flex-col gap-2", className)}16 {...props}17 />18))19Tabs.displayName = "Tabs"2021const TabsContent = React.forwardRef<22 React.ElementRef<typeof TabsPrimitive.Content>,23 TabsPrimitive.ContentProps24>(({ className, ...props }, ref) => (25 <TabsPrimitive.Content26 ref={ref}27 className={cn("flex-1 outline-none", className)}28 {...props}29 />30))31TabsContent.displayName = "TabsContent"3233const TabsContext = TabsPrimitive.Context3435const TabsIndicator = React.forwardRef<36 React.ElementRef<typeof TabsPrimitive.Indicator>,37 React.ComponentPropsWithoutRef<typeof TabsPrimitive.Indicator>38>(({ className, ...props }, ref) => (39 <TabsPrimitive.Indicator40 ref={ref}41 className={cn(42 "h-(--height) w-(--width) rounded-sm bg-background text-foreground shadow-xs",43 className44 )}45 {...props}46 />47))48TabsIndicator.displayName = "TabsIndicator"4950const TabsList = React.forwardRef<51 React.ElementRef<typeof TabsPrimitive.List>,52 TabsPrimitive.ListProps53>(({ className, ...props }, ref) => (54 <TabsPrimitive.List55 ref={ref}56 className={cn(57 "relative inline-flex items-center justify-center rounded-md bg-muted p-0.5 text-muted-foreground/70 data-[orientation=vertical]:flex-col",58 className59 )}60 {...props}61 />62))63TabsList.displayName = "TabsList"6465const TabsRootProvider = TabsPrimitive.RootProvider6667const TabsTrigger = React.forwardRef<68 React.ElementRef<typeof TabsPrimitive.Trigger>,69 TabsPrimitive.TriggerProps70>(({ className, ...props }, ref) => (71 <TabsPrimitive.Trigger72 ref={ref}73 className={cn(74 "inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 font-medium text-sm outline-none transition-all hover:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 data-[selected]:z-10 data-[orientation=vertical]:w-full data-[selected]:text-foreground [&_svg]:shrink-0",75 className76 )}77 {...props}78 />79))80TabsTrigger.displayName = "TabsTrigger"8182export {83 Tabs,84 TabsContent,85 TabsContext,86 TabsIndicator,87 TabsList,88 TabsRootProvider,89 TabsTrigger,90}9192// … truncated
What it pulls in
npm packages
Files it writes
More from shipbase/ui
All 32 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| accordionaccordion | shipbase/ui | Components | Free | 2 deps | |
| avataravatar | shipbase/ui | Components | Free | 1 dep | |
| badgebadge | shipbase/ui | Components | Free | 2 deps | |
| buttonbutton | shipbase/ui | Components | Free | 2 deps | |
| cardcard | shipbase/ui | Components | Free | 1 dep | |
| checkboxcheckbox | shipbase/ui | Components | Free | 2 deps | |
| collapsiblecollapsible | shipbase/ui | Components | Free | 1 dep | |
| comboboxcombobox | shipbase/ui | Components | Free | 2 deps |
