DocsGitHub
Getting Started
  • Overview
  • Design Tokens
Components
  • Accordion
  • Alert
  • Announcement
  • Avatar
  • Badge
  • BigCalendar
  • Breadcrumb
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Checkbox
  • Chip
  • CloseButton
  • Combobox
  • CommandPalette
  • ContextMenu
  • Currency
  • DatePicker
  • DescriptionList
  • Drawer
  • DropdownMenu
  • EmptyState
  • Field
  • FileUpload
  • FormGrid
  • Hotkey
  • Icon
  • Input
  • Metric
  • Modal
  • MultiSelect
  • NumberInput
  • Pagination
  • Popover
  • ProgressBar
  • Radio
  • Rating
  • SegmentedControl
  • Select
  • SelectionCard
  • Sidebar
  • Skeleton
  • Slider
  • Spinner
  • Stepper
  • Switch
  • Table
  • Tabs
  • Textarea
  • Timeline
  • TimePicker
  • Toast
  • Tooltip
  • TransferList
  • TreeView
  • Wizard
Charts
  • Overview
  • Area Chart
  • Bar Chart
  • Donut Chart
  • Line Chart
  • Pie Chart
  • Stacked Bar Chart

Tabs

Organizes content into separate views which users can switch between.

Installation

tsx
import { Tabs } from "madagent";

Default

Account settings and preferences.

With Disabled Tab

This tab is active.

PropTypeDefaultDescription
tabs*
TabItem[]
-Array of tab items with id, label, content, and optional disabled
defaultActiveId
string
-Initial active tab id (uncontrolled)
activeId
string
-Active tab id (controlled)
onChange
(id: string) => void
-Callback when the active tab changes

RTL Support

Components automatically adapt to right-to-left languages using CSS logical properties.

Preview

محتوى النظرة العامة

Usage

tsx
<div style={{ display: "flex", justifyContent: "center", padding: 20, maxWidth: 400 }}>
  <Tabs
    tabs={[
      { id: "tab1", label: "النظرة العامة", content: "محتوى النظرة العامة" },
      { id: "tab2", label: "التفاصيل", content: "محتوى التفاصيل" },
      { id: "tab3", label: "الإعدادات", content: "محتوى الإعدادات" },
    ]}
  />
</div>