Interactive Tabs Component

A fully accessible, customizable tabs component with smooth animations and keyboard navigation

Default Style Tabs

Interactive Tabs Component

This is a fully accessible tabs component built with modern web standards. It includes:

  • Full keyboard navigation
  • ARIA compliance
  • Smooth animations
  • Multiple style variants
  • Responsive design

Pills Style Tabs

Design Principles

The pills variant provides a modern, button-like appearance that works well in compact spaces.

Visual Hierarchy

Clear distinction between active and inactive states

User Experience

Intuitive interaction patterns

Vertical Orientation

Vertical Layout

Perfect for forms, settings panels, or when you have many tabs to display. The vertical orientation provides better space utilization on wider screens.

Key Features & Benefits

♿

Accessibility First

Full WCAG 2.1 compliance with proper ARIA attributes and keyboard navigation

⚡

High Performance

Lightweight implementation with smooth CSS transitions and minimal JavaScript

🎨

Fully Customizable

Multiple style variants and easy theming with CSS custom properties

📱

Responsive Design

Works seamlessly across all device sizes and orientations

🔧

Developer Friendly

Simple API with TypeScript support and comprehensive documentation

🚀

Progressive Enhancement

Works without JavaScript and enhances with smooth interactions

How to Use

Quick Start

  1. Import the TabsComponent into your Astro page
  2. Define your tabs data with id, label, and content
  3. Add the component with your preferred variant and orientation
  4. Customize the styling to match your design system

Keyboard Navigation

The component supports full keyboard navigation:

  • Arrow Keys: Navigate between tabs
  • Enter/Space: Activate focused tab
  • Home/End: Jump to first/last tab
  • Tab: Move focus to tab panel content
Back