# Tabs (/navigation/tabs)





<ComponentPreview name="tabs-demo" description="Tabs with accessible keyboard navigation." />

## Installation [#installation]

<CodeTabs>
  <TabsList>
    <TabsTrigger id="cli">
      CLI
    </TabsTrigger>

    <TabsTrigger id="manual">
      Manual
    </TabsTrigger>
  </TabsList>

  <TabsContent id="cli">
    ```bash
    npx shadcn@latest add @preskok/tabs
    ```
  </TabsContent>

  <TabsContent id="manual">
    <Steps>
      <Step>
        Copy and paste the following code into your project.

        <ComponentSource name="tabs" title="registry/preskok/ui/preskok-ui/tabs.tsx" />
      </Step>

      <Step>
        Update the import paths to match your project setup.
      </Step>
    </Steps>
  </TabsContent>
</CodeTabs>

## Usage [#usage]

```tsx
import { Tabs } from "@/components/ui/preskok-ui/tabs"

export function TabsDemo() {
  return (
    <Tabs defaultSelectedKey="1" items={[{ id: "1", title: "Tab 1" }]}>
      {(item) => <div>{item.title}</div>}
    </Tabs>
  )
}
```
