nessra uinessra ui

A set of layered sections of content, known as tab panels.

Loading...
import {
  Tabs,
  TabsContent,

Installation

pnpmnpmyarnbun
pnpm dlx shadcn@latest add https://nessra-ui.vercel.app/r/tabs.json

Usage

import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"
<Tabs defaultValue="account" className="w-[400px]">
  <TabsList>
    <TabsTrigger value="account">Account</TabsTrigger>
    <TabsTrigger value="password">Password</TabsTrigger>
  </TabsList>
  <TabsContent value="account">Account settings here.</TabsContent>
  <TabsContent value="password">Password settings here.</TabsContent>
</Tabs>

Examples

Underline

Loading...
import {
  Tabs,
  TabsContent,

With Cards

Loading...
import { Button } from "@/components/ui/button"
import {
  Card,

API Reference

Tabs

ComponentDescription
TabsThe root component
TabsListContainer for tab triggers
TabsTriggerThe tab button
TabsContentContent for each tab

Tabs Props

PropTypeDefaultDescription
valuestring-The controlled value
defaultValuestring-The default value
onValueChange(value: string) => void-Callback when value changes
orientation"horizontal" | "vertical""horizontal"The orientation

TabsList Props

PropTypeDefaultDescription
variant"default" | "underline""default"The visual variant of the tabs

TabsTrigger Props

PropTypeDefaultDescription
valuestring-The value of the tab (required)
disabledbooleanfalseDisable the tab

TabsContent Props

PropTypeDefaultDescription
valuestring-The value matching the trigger (required)