Blossom UI

Tabs

Tabs component with underline, pills and boxed styles, icons and arrow key navigation.

How to use it

Run npx @blossomui/react add tabs, or copy src/components/UI/Tabs/Tabs.tsx into your React project and import it.

import { Tabs } from './components/ui/Tabs'

Props

Tab

PropTypeDescription
id (required)string
label (required)string
content (required)ReactNode
iconReactNode
disabledboolean

TabsProps

PropTypeDescription
keepMountedbooleanKeep the panels of the other tabs mounted (hidden), so they do not lose their state when you change tab.
colorstringAccent color of this component: any CSS color. Without it the component uses `--blossom-accent`, which is pink by default.
tabs (required)Tab[]
defaultValuestringId of the tab that starts selected when the component is not controlled.
valuestringControlled selected tab. Use together with `onChange`.
onChange(id: string) => void
variant'underline' | 'pills' | 'boxed'`underline` draws a line under the active tab, `pills` fills it and `boxed` puts the tabs in a container.
fullWidthbooleanMake every tab take the same share of the width.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree