Foundations
Icons
Actions
Buttons
Form Controls
Input
Text Area
Select Dropdown
Filter Dropdown
Checkbox
Radio Button
Switch
File Uploader
Color Picker
Multi Select
Search Input
Slider
OTP Input
Date Picker
Time Picker
Date Range Picker
Data Display
Table
Pagination
Progress Bar
Stat Card
Circular Progress
Navigation
Side Menu
Menu Bar
Tabs
Breadcrumb
Ellipsis
Content & Layout
Card
Divider
Banner
Carousel
Accordion
Timeline
Stepper
List
Overlays
Modal
Drawer
Popover
Command Palette
Dropdown Menu
Context Menu
Indicators
Tags
Chips
Badge
Avatar
Avatar Group
Tooltip
Skeleton
Spinner
Feedback
Snackbar
Alert
Callout
State
Tabs
Name, photo and bio.
ITabItem[]Tabs as { key, label, content, disabled? }. Content is rendered under the tab list.
—stringKey of the selected tab. Defaults to the first one.
—TABS_VARIANTTab list style.
TABS_VARIANT.UNDERLINE(key: string) => voidCalled with the key of the tab the user picks.
—stringExtra classes on the wrapper.
""import { useState } from "react";
import { Tabs } from "gwan-design-system";
const items = [
{
key: "profile",
label: "Profile",
content: <p className="text-sm text-muted-fg py-4">Name, photo and bio.</p>,
},
{
key: "security",
label: "Security",
content: <p className="text-sm text-muted-fg py-4">
Password and two-factor settings.
</p>,
},
{
key: "billing",
label: "Billing",
content: <p className="text-sm text-muted-fg py-4">
Plan, invoices and payment method.
</p>,
},
{
key: "api",
label: "API",
content: <p className="text-sm text-muted-fg py-4">
Keys are available on paid plans.
</p>,
disabled: true,
},
];
const Example = () => {
const [activeKey, setActiveKey] = useState("profile");
return (
<Tabs
items={items}
activeKey={activeKey}
onChange={setActiveKey}
/>
);
};