Colors
Complete color palette including primary, accent, and semantic colors
A lightweight design system that provides clear guidelines, reusable components, and helpful resources for building consistent and visually appealing user interfaces.
Built using Tailwind CSS and Headless UI.
Complete color palette including primary, accent, and semantic colors
Interactive font styles with live preview
4-point grid system for consistent spacing
Button styles and variations across different themes
Navigation components with accessibility support
Collapsible content sections with icons, badges, and nested tabs
Status indicators and notification components
Multiple card variants with different themes and styles
Responsive breakpoints for different devices
Shadow styles for elevation and depth
Transparent layers for highlighting elements
Our enhanced adaptive color system provides three distinct themes with improved contrast ratios and WCAG compliance. Each theme has been carefully designed for accessibility while maintaining visual appeal and brand consistency.
Clean and professional palette perfect for productivity applications and daytime use.
Sophisticated dark palette that reduces eye strain and enhances focus during extended use.
Vibrant, gradient-rich palette for creative applications and immersive user experiences.
Clean and professional design optimized for daytime use and productivity applications.
Interactive preview of light theme styling
Sophisticated dark palette designed to reduce eye strain and enhance focus during extended use.
Interactive preview of dark theme styling
Harmonized blue-violet-indigo palette perfect for creative applications and immersive user experiences.
Interactive preview of colorful theme styling
Quick reference for implementing our color system in your projects
Our color system meets WCAG accessibility guidelines to ensure your designs are usable by everyone.
Examples of text color combinations on light backgrounds
Primary Text
Contrast: 16.8:1
Secondary Text
Contrast: 12.6:1
Primary Blue
Contrast: 5.4:1
Light Gray (Fail)
Contrast: 1.8:1
Examples of text color combinations on dark backgrounds
Primary Text
Contrast: 19.1:1
Secondary Text
Contrast: 14.8:1
Primary Blue
Contrast: 6.2:1
Dark Gray (Fail)
Contrast: 1.9:1
AAA: 7:1 for normal text
AA: 4.5:1 for normal text
Large text: 3:1 minimum
UI elements: 3:1 minimum
• Don't rely only on color
• Use icons and patterns
• Test with simulators
• Provide alternative cues
• Test with real users
• Use automated tools
• Consider context
• Document decisions
Our typography system showcases different font styles and sizes for headers and body text in both English and Arabic languages.
Typography examples for headers and body text in English
Typography examples for headers and body text in Arabic with RTL support
A comprehensive, interactive spacing system with enhanced visual clarity, accessibility features, and real-time preview capabilities. Based on a 4px grid for consistent, harmonious layouts.
Fine adjustments and minimal spacing
Standard component spacing
Section and component separation
Page-level and major spacing
<div className="p-4">
Content with 16px padding
</div>
<!-- Directional padding -->
<div className="pt-4">Top padding</div>
<div className="pr-4">Right padding</div>
<div className="pb-4">Bottom padding</div>
<div className="pl-4">Left padding</div>
<div className="px-4">Horizontal padding</div>
<div className="py-4">Vertical padding</div>WCAG-compliant spacing recommendations
Touch Target Guidelines
Minimum 44px (space-12) for interactive elements
Focus Indicator Space
2px minimum (space-0.5) around focus outlines
Reading Comfort
16px+ (space-4) between text blocks for readability
Visual Hierarchy
Use 1.5x spacing differences to create clear levels
Use consistent scale values
Stick to the 4px grid system for visual consistency
Progressive spacing increases
Use larger spacing between major sections
Responsive spacing adjustments
Reduce spacing on smaller screens appropriately
Avoid arbitrary values
Don't use custom spacing outside the scale
Don't overcrowd interfaces
Ensure adequate breathing room between elements
Consistent spacing creates visual hierarchy and improves readability.
A grid system creates the invisible architecture that brings visual harmony and balance to your layouts. It's the foundation that enables both aesthetic beauty and functional clarity.
Our system divides the canvas into 12 equal columns—a number chosen for its exceptional mathematical harmony. Being divisible by 2, 3, 4, and 6, it enables balanced layouts with countless proportional possibilities.
From digital layouts to architectural design, grid systems provide the underlying structure that creates visual balance. Here's how different grid arrangements create distinct visual experiences:
Feature-driven layout with clear hierarchy emphasizing the main story while providing easy access to supporting content.
Product grid that creates visual rhythm through repetition while maintaining flexibility for various screen sizes.




Visual grid that creates an immersive gallery experience with equal focus on each image while maintaining visual harmony.
Like a musical composition that adapts to different venues, our responsive grid system automatically transforms to create visual harmony on any screen size.
Easy scrolling for small screens
Strategic two-column layout
Expansive layout for larger screens
Our responsive grid system intelligently adapts to create the most visually harmonious layout for each device:
Single-column product display optimized for browsing on small screens
Dual-column product grid balancing details and product visibility
Rich four-column e-commerce grid showcasing multiple products at once
These grid patterns showcase the versatility of our system, each designed to bring visual harmony to different types of content while maintaining a cohesive design language.
Harmonious equal-width columns for balanced content
<div class="grid grid-cols-3 gap-4">
<div>Column 1</div>
<div>Column 2</div>
<div>Column 3</div>
</div>Fluid columns that gracefully adapt to any viewport
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4">
<div>Item 1</div>
<div>Item 2</div>
<div>Item 3</div>
<div>Item 4</div>
<div>Item 5</div>
<div>Item 6</div>
</div>Creates visual hierarchy with intentional column spans
<div class="grid grid-cols-6 gap-4">
<div class="col-span-4">Primary content focus</div>
<div class="col-span-2">Secondary content</div>
<div class="col-span-3">Featured item</div>
<div class="col-span-3">Supporting content</div>
<div class="col-span-6">Full-width footer</div>
</div>Precise control with golden ratio proportions
<div class="grid grid-cols-12 gap-4">
<div class="col-start-1 col-end-9">Main content (spans 8/12)</div>
<div class="col-start-9 col-end-13">Sidebar (spans 4/12)</div>
<div class="col-start-1 col-end-5">Feature box</div>
<div class="col-start-5 col-end-13">Extended content</div>
</div>Flow-based layout that naturally fills available space
<div class="grid grid-cols-none grid-flow-dense auto-cols-fr gap-4">
<div class="col-span-2">Featured content</div>
<div>Standard item</div>
<div class="col-span-3">Showcase element</div>
<div>Standard item</div>
<div>Standard item</div>
</div>A harmonious grid system isn't just about technical implementation—it's about creating visual rhythm and balance that guides the user's eye naturally through the content. The principles below will help you create designs that feel intentional, refined, and emotionally resonant.
"The most sophisticated designs often appear simple—they achieve harmony through disciplined use of grid systems. Their elegance comes not from adding more elements, but from finding the perfect placement for every essential one."
Everything you need to implement our harmonious grid system in your projects. These tools and techniques will help you build consistent, responsive layouts.
Define n equal columns
Make element span n cols
Start at column n
End at column n
Set item spacing
Control item placement
Use the 12-column system for most layouts as it provides the most flexible division options.
sm:640px+md:768px+lg:1024px+xl:1280px+2xl:1536px+<div class="gridgrid-cols-1sm:grid-cols-2md:grid-cols-3lg:grid-cols-4gap-4"> <!-- Content adapts to all screen sizes --> </div>Name grid areas for semantic layouts
grid-template-areas: 'header header' 'sidebar main';Dynamic column count based on container width
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));Control item positioning within their grid cells
place-items: center stretch;Combine CSS Grid with CSS Variables to create dynamic, themable layouts that can adapt to user preferences.
Follow these best practices to maintain a consistent, accessible grid system across your entire application.
Use appropriate HTML elements to maintain accessibility and SEO
Start with mobile layouts and progressively enhance for larger screens
Use the design system's spacing scale for harmonious proportions
Let content needs determine your breakpoints, not device sizes
Ensure layouts work without CSS Grid for older browsers
Document grid patterns for team consistency and onboarding
Interactive navigation components with keyboard accessibility support. Choose between classic tabs with underline indicators or modern pill-style navigation with rounded corners.
This is the content for the overview section. Tabs provide clear navigation between related content sections.
This is the content for the overview section. Pills provide a clean, rounded navigation style perfect for categories and filters.
This is the content for the overview section. Tabs provide clear navigation between related content sections.
This is the content for the overview section. Pills provide a clean, rounded navigation style perfect for categories and filters.
This is the content for the overview section. Tabs provide clear navigation between related content sections.
This is the content for the overview section. Pills provide a clean, rounded navigation style perfect for categories and filters.
This is the content for the small section. Pills provide a clean, rounded navigation style perfect for categories and filters.
This is the content for the small section. Pills provide a clean, rounded navigation style perfect for categories and filters.
This is the content for the small section. Pills provide a clean, rounded navigation style perfect for categories and filters.
Versatile badge components for status indicators, notifications, counts, and featured content. Designed with semantic colors and accessibility in mind.
Communicate state and status with semantic colors and clear iconography.
Overlay badges on buttons and icons to show pending notifications.
Display numerical values with automatic truncation for large numbers.
Highlight special content with animated and gradient badge styles.
A flexible card system with multiple variants and themes to showcase content across your interface.
Clean, bright design with subtle gradients optimized for daylight viewing.
Sophisticated dark palette (#0a0a0a) with blue accents for night browsing.
Vibrant cosmic gradient with cyan, magenta and blue from #3b82f6 to #a855f7 to #3b82f6.
<ThemeCard
variant="default"
theme="light-enhanced" // Options: 'light-enhanced', 'dark-enhanced', 'colorful'
title="Theme Card"
description="Card description goes here"
materialIcon={LightModeIcon}
/>A clean, minimalist card that changes background on hover.
Features a subtle gradient background for visual interest.
Uses a colored border to highlight important content.
Raises on hover to create a sense of depth and interaction.
Transparent backdrop with blur effect for a modern look.
// Available variants: 'default' | 'minimal' | 'gradient' | 'bordered' | 'elevated' | 'glass'
<ThemeCard
variant="gradient"
title="Gradient Card"
description="Card description goes here"
materialIcon={ColorLensIcon}
/>A clean, minimalist light card that changes background on hover.
Light theme with subtle gradient background for visual interest.
Light theme with a colored border to highlight content.
Light theme with elevation effect that raises on hover.
Light theme with a subtle glass effect and backdrop blur.
A clean, minimalist dark card that changes background on hover.
Dark theme with subtle gradient background for visual interest.
Dark theme with a colored border to highlight content.
Dark theme with elevation effect that raises on hover.
Dark theme with a subtle glass effect and backdrop blur.
A clean, minimalist cosmic card that changes background on hover.
Cosmic theme with gradient background for vibrant visual interest.
Cosmic theme with a colored border to highlight content.
Cosmic theme with elevation effect that raises on hover.
Cosmic theme with a subtle glass effect and backdrop blur.
<ThemeCard
variant="glass" // Any card variant
theme="colorful" // Options: 'light-enhanced', 'dark-enhanced', 'colorful'
title="Glass Cosmic"
description="Cosmic theme with glass effect"
materialIcon={BlurOnIcon}
className="hover:shadow-[0_8px_24px_rgba(255,0,204,0.4)]"
/>Simple card components for displaying content in a clean, consistent format, available in Light, Dark, and Colorful themes.
A simple card with minimal styling, perfect for general content display.
Used for displaying information or helpful tips to users.
Used to confirm successful actions or positive outcomes.
A simple card with minimal styling, perfect for general content display.
Used for displaying information or helpful tips to users.
Used to confirm successful actions or positive outcomes.
A simple card with minimal styling, perfect for general content display.
Used for displaying information or helpful tips to users.
Used to confirm successful actions or positive outcomes.
<BasicCard
theme="light" // Options: 'light', 'dark', 'colorful'
variant="basic" // Options: 'basic', 'info', 'success', 'warning', 'danger'
title="Card Title"
description="Card description goes here."
/>Cards with interactive elements that respond to user actions like hover, click, and touch - available in Light, Dark, and Colorful themes.
This card animates on hover with a subtle lift and color change.
This card has a tactile click effect when pressed.
This card animates on hover with a subtle lift and color change.
This card has a tactile click effect when pressed.
This card animates on hover with a subtle lift and color change.
This card has a tactile click effect when pressed.
<InteractiveCard
theme="light" // Options: 'light', 'dark', 'colorful'
variant="hover" // Options: 'hover', 'click', 'expand'
title="Card Title"
description="Card description text"
/>Cards designed to showcase images, videos, and other rich media content - available in Light, Dark, and Colorful themes.

Simple card with an image at the top and content below.

Card with text overlay on the image for a more dramatic effect.

Card with image on the side for a balanced layout.

Simple card with an image at the top and content below.

Card with text overlay on the image for a more dramatic effect.

Card with image on the side for a balanced layout.

Simple card with an image at the top and content below.

Card with text overlay on the image for a more dramatic effect.

Card with image on the side for a balanced layout.
<MediaCard
theme="light" // Options: 'light', 'dark', 'colorful'
variant="basic" // Options: 'basic', 'overlay', 'horizontal'
title="Card Title"
description="Card description text"
imagePath="/path/to/image.jpg"
/>Card components designed for displaying data, statistics, and analytics in dashboards - available in Light, Dark, and Colorful themes.
1,284
12.5% increase
68%
4% this week
$12,628
8.2% increase
1,284
12.5% increase
68%
4% this week
$12,628
8.2% increase
1,284
12.5% increase
68%
4% this week
$12,628
8.2% increase
<DashboardCard
theme="light" // Options: 'light', 'dark', 'colorful'
variant="stat" // Options: 'stat', 'progress', 'chart'
title="Total Users"
value="1,284"
change="12.5% increase"
isPositive={true}
icon={<UserIcon className="h-5 w-5" />}
// Icon styling is now handled automatically based on theme:
// Light theme: bg-blue-500/10 text-blue-500
// Dark theme: bg-blue-500/10 text-blue-400
// Colorful theme: bg-fuchsia-500/10 text-fuchsia-400
/>Cards designed for displaying user profiles, team members, and contact information - available in Light, Dark, and Colorful themes.
Product Designer
UI/UX specialist with 5+ years of experience in creating beautiful, functional interfaces.
Frontend Developer
UX Researcher
Creating user-centered designs through research and testing
Product Designer
UI/UX specialist with 5+ years of experience in creating beautiful, functional interfaces.
Frontend Developer
UX Researcher
Creating user-centered designs through research and testing
Product Designer
UI/UX specialist with 5+ years of experience in creating beautiful, functional interfaces.
Frontend Developer
UX Researcher
Creating user-centered designs through research and testing
<ProfileCard
theme="light" // Options: 'light', 'dark', 'colorful'
variant="basic" // Options: 'basic', 'compact', 'horizontal'
name="Alex Morgan"
title="Product Designer"
description="UI/UX specialist with experience in creating interfaces."
/>Cards designed for showing professional experience, career timelines, or event histories across different themes.
Product vision, specifying features, prototyping, and handing off design system to developers.
Product vision, specifying features, prototyping, and handing off design system to developers.
Product vision, specifying features, prototyping, and handing off design system to developers.
<TimelineCard
theme="light" // Options: 'light', 'dark', 'colorful'
materialIcon={RocketLaunchIcon} // Material UI icon (when using this, the icon prop becomes optional)
title="Product Designer | Product Owner"
date="2023 – Present"
location="Webropol, Helsinki, Finland"
description="Product vision, specifying features, prototyping, and handing off design system to developers."
/>Collapsible content sections with multiple variants, icon support, badges, and nested tab functionality. Perfect for FAQs, documentation, and content organization with full accessibility support.
import Accordion from '@/components/Accordion';
const items = [
{
id: 'item-1',
title: 'Accordion Item 1',
content: 'Content for the first accordion item.',
icon: <InfoIcon />,
badge: { text: 'New', variant: 'info' }
}
];
<Accordion items={items} /><Accordion
items={items}
variant="bordered" // default | bordered | filled | minimal
allowMultiple={true} // Allow multiple items open
iconPosition="right" // left | right
size="lg" // sm | md | lg
theme="colorful" // light | dark | colorful
/>const itemWithTabs = {
id: 'complex-item',
title: 'Component Documentation',
content: 'This section contains detailed documentation.',
hasNestedTabs: true, // Enables nested tabs
badge: { text: 'Interactive', variant: 'success' }
};// Light theme (default)
<Accordion items={items} theme="light" />
// Dark theme with enhanced contrast
<Accordion items={items} theme="dark" />
// Colorful theme with purple/blue gradients
<Accordion items={items} theme="colorful" variant="bordered" />Proven layout patterns that provide structure and visual hierarchy to your applications. These patterns serve as starting points for creating consistent, user-friendly interfaces.
Classic three-section layout with header, main content area, and footer
Most web applications, marketing sites, documentation
<div className="min-h-screen flex flex-col">
{/* Header */}
<header className="bg-white dark:bg-neutral-900 border-b border-neutral-200 dark:border-neutral-800">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex justify-between items-center h-16">
<div className="flex items-center">
<h1 className="text-xl font-bold">Your App</h1>
</div>
<nav className="hidden md:flex space-x-8">
<a href="#" className="text-neutral-700 dark:text-neutral-300 hover:text-primary-600">Home</a>
<a href="#" className="text-neutral-700 dark:text-neutral-300 hover:text-primary-600">About</a>
<a href="#" className="text-neutral-700 dark:text-neutral-300 hover:text-primary-600">Contact</a>
</nav>
</div>
</div>
</header>
{/* Main Content */}
<main className="flex-1 bg-neutral-50 dark:bg-neutral-950">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
<h1 className="text-3xl font-bold text-neutral-900 dark:text-white mb-6">
Main Content
</h1>
<p className="text-neutral-700 dark:text-neutral-300">
Your page content goes here...
</p>
</div>
</main>
{/* Footer */}
<footer className="bg-white dark:bg-neutral-900 border-t border-neutral-200 dark:border-neutral-800">
<div className="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6">
<div className="text-center text-neutral-600 dark:text-neutral-400">
© 2024 Your Company. All rights reserved.
</div>
</div>
</footer>
</div>Use layout to guide users through content with clear importance levels and reading flow.
Start with mobile layouts and progressively enhance for larger screens.
Use consistent spacing patterns to create rhythm and improve readability.
Design layouts around your content needs, not arbitrary grid constraints.
Ensure interactive elements are appropriately sized for touch interaction.
Consider loading times and optimize layouts for fast rendering and interaction.
Comprehensive form controls built with Headless UI and Tailwind CSS, featuring validation, accessibility, and modern interactions.
Essential form inputs with validation states and proper accessibility.
Form Input with Validation
<div>
<label htmlFor="email" className="block text-sm font-medium text-neutral-700 mb-2">
Email Address
</label>
<input
type="email"
id="email"
className={`block w-full rounded-lg border px-3 py-2 shadow-sm focus:outline-none focus:ring-2 ${
errors.email
? 'border-red-300 focus:border-red-500 focus:ring-red-500'
: 'border-neutral-300 focus:border-blue-500 focus:ring-blue-500'
}`}
placeholder="Enter your email"
/>
{errors.email && (
<div className="mt-2 flex items-center text-sm text-red-600">
<ExclamationCircleIcon className="h-4 w-4 mr-1" />
{errors.email}
</div>
)}
</div>Advanced select components with search, multi-select, and custom styling.
Combobox with Search
<Combobox value={selected} onChange={setSelected}>
<div className="relative mt-1">
<div className="relative w-full cursor-default overflow-hidden rounded-lg bg-white text-left shadow-md focus:outline-none focus-visible:ring-2 focus-visible:ring-white focus-visible:ring-opacity-75 focus-visible:ring-offset-2 focus-visible:ring-offset-blue-300 sm:text-sm">
<Combobox.Input
className="w-full border-none py-2 pl-3 pr-10 text-sm leading-5 text-gray-900 focus:ring-0"
displayValue={(person) => person.name}
onChange={(event) => setQuery(event.target.value)}
/>
<Combobox.Button className="absolute inset-y-0 right-0 flex items-center pr-2">
<ChevronUpDownIcon className="h-5 w-5 text-gray-400" aria-hidden="true" />
</Combobox.Button>
</div>
<Combobox.Options className="absolute mt-1 max-h-60 w-full overflow-auto rounded-md bg-white py-1 text-base shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm">
{filteredPeople.map((person) => (
<Combobox.Option key={person.id} className={({ active }) => `relative cursor-default select-none py-2 pl-10 pr-4 ${active ? 'bg-blue-600 text-white' : 'text-gray-900'}`} value={person}>
{({ selected, active }) => (
<>
<span className={`block truncate ${selected ? 'font-medium' : 'font-normal'}`}>
{person.name}
</span>
{selected ? (
<span className={`absolute inset-y-0 left-0 flex items-center pl-3 ${active ? 'text-white' : 'text-blue-600'}`}>
<CheckIcon className="h-5 w-5" aria-hidden="true" />
</span>
) : null}
</>
)}
</Combobox.Option>
))}
</Combobox.Options>
</div>
</Combobox>Custom radio groups and toggle switches with smooth animations.
Startup
Perfect for small teams $29Business
For growing companies $99Enterprise
For large organizations $199Switch Component
<Switch.Group>
<div className="flex items-center justify-between">
<div className="flex flex-col">
<Switch.Label as="span" className="text-sm font-medium text-gray-900">
Email Notifications
</Switch.Label>
<Switch.Description as="span" className="text-sm text-gray-500">
Receive email updates about your account.
</Switch.Description>
</div>
<Switch
checked={enabled}
onChange={setEnabled}
className={`${enabled ? 'bg-blue-600' : 'bg-gray-200'} relative inline-flex h-6 w-11 items-center rounded-full transition-colors focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2`}
>
<span
className={`${enabled ? 'translate-x-6' : 'translate-x-1'} inline-block h-4 w-4 transform rounded-full bg-white transition-transform`}
/>
</Switch>
</div>
</Switch.Group>Our responsive breakpoints ensure layouts adapt seamlessly across different screen sizes, following Tailwind CSS's mobile-first approach.
| Breakpoint | Screen Size | Prefix | Example Usage |
|---|---|---|---|
Small (Mobile) | < 640px | default | flex |
Medium (Tablet) | ≥ 640px | sm: | sm:flex |
Medium Large | ≥ 768px | md: | md:flex |
Large (Laptop) | ≥ 1024px | lg: | lg:flex |
X-Large (Desktop) | ≥ 1280px | xl: | xl:flex |
2X-Large | ≥ 1536px | 2xl: | 2xl:flex |
Adapt the number of columns based on screen width
<div class="grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-6 gap-4">
<!-- Content adapts from 1 to 6 columns based on screen size -->
</div>Show or hide elements based on screen size
<!-- Element visible only on small screens (mobile) -->
<div class="block sm:hidden">Mobile only content</div>
<!-- Element visible only on medium screens and up -->
<div class="hidden sm:block">Content for tablets and larger</div>
<!-- Element visible only on large screens and up -->
<div class="hidden lg:block">Content for laptops and larger</div>Adjust element dimensions at different breakpoints
<img
class="w-full md:w-1/2 lg:w-1/3 xl:w-1/4"
src="/image.jpg"
alt="Responsive image"
/>Our design system follows Tailwind CSS's mobile-first approach, where styles are applied to mobile by default and then modified at larger breakpoints:
This approach allows for clean, maintainable code that builds from small screens up to larger ones, reducing CSS bloat and ensuring a consistent experience across all devices.
Our shadow system creates depth and elevation in the interface.
Shadow Small
0px 1px 2px rgba(0, 0, 0, 0.05)
Shadow Medium
0px 4px 6px -1px rgba(0, 0, 0, 0.1), 0px 2px 4px -1px rgba(0, 0, 0, 0.06)
Shadow Large
0px 10px 15px -3px rgba(0, 0, 0, 0.1), 0px 4px 6px -2px rgba(0, 0, 0, 0.05)
Shadow X-Large
0px 20px 25px -5px rgba(0, 0, 0, 0.1), 0px 10px 10px -5px rgba(0, 0, 0, 0.04)
Our tint system provides transparent overlays for various UI elements.
Primary Light
rgba(30, 104, 128, 0.1)
Primary Medium
rgba(30, 104, 128, 0.2)
Primary Dark
rgba(30, 104, 128, 0.4)
Accent Light
rgba(254, 73, 17, 0.1)
Accent Medium
rgba(254, 73, 17, 0.2)
Accent Dark
rgba(254, 73, 17, 0.4)
A comprehensive set of tools and patterns for building accessible components following WCAG 2.1 standards and Headless UI best practices.
Our design system components utilize Headless UI patterns for unstyled, accessible UI components that work with any styling solution. This integration ensures all interactive elements meet WCAG accessibility standards.
// Example: Using Headless UI Tab component with our accessibility patterns
import { Tab } from '@headlessui/react';
import { useUniqueId } from '../utils/headlessPatterns';
function MyTabs() {
// Generate unique IDs for ARIA relationships
const tabsId = useUniqueId('tabs');
return (
<Tab.Group>
<Tab.List>
<Tab id={`${tabsId}-tab-1`} aria-controls={`${tabsId}-panel-1`}>
Tab 1
</Tab>
<Tab id={`${tabsId}-tab-2`} aria-controls={`${tabsId}-panel-2`}>
Tab 2
</Tab>
</Tab.List>
<Tab.Panels>
<Tab.Panel
id={`${tabsId}-panel-1`}
aria-labelledby={`${tabsId}-tab-1`}
tabIndex={0}
>
Content 1
</Tab.Panel>
<Tab.Panel
id={`${tabsId}-panel-2`}
aria-labelledby={`${tabsId}-tab-2`}
tabIndex={0}
>
Content 2
</Tab.Panel>
</Tab.Panels>
</Tab.Group>
)
}Tools for managing keyboard focus according to WAI-ARIA authoring practices.
// Trap focus in a modal
const cleanup = focusManager.trapFocus(modalElement);
// Restore focus when modal closes
cleanup(); // Restore focus to previous elementStandardized keyboard interactions for menus, lists, and other components.
// Create arrow key navigation for a menu
const cleanup = keyboardNavigation.createMenuNavigation(
menuElement,
{
onSelect: (item) => item.click()
}
);Announce dynamic content changes to assistive technologies.
// Announce a message to screen readers
announceToScreenReader(
'Item successfully added to cart',
false // Use 'false' for polite, 'true' for assertive
);Adapt to user preferences like reduced motion and high contrast.
// Use reduced motion preference
const prefersReducedMotion = responsive.useReducedMotion();
// Adjust animation duration
const duration = responsive.getAnimationDuration(300); // 0 if reduced motion is preferredPre-defined ARIA patterns for common components following WAI-ARIA 1.2 practices.
<div
role="dialog"
aria-modal="true"
aria-labelledby="modal-title"
aria-describedby="modal-description"
>
<h2 id="modal-title">Modal Title</h2>
<p id="modal-description">Modal content description.</p>
</div><div
role="alert"
aria-live="assertive"
>
Error: Form submission failed.
</div>
<div
role="status"
aria-live="polite"
>
Success: Your changes were saved.
</div>const tabProps = patterns.navigation.tabs(0);
<div {...tabProps}>
<button {...tabProps.tab(0)}>Tab 1</button>
<button {...tabProps.tab(1)}>Tab 2</button>
<div {...tabProps.panel(0)}>Panel 1 content</div>
<div {...tabProps.panel(1)}>Panel 2 content</div>
</div>const disclosureProps = patterns.button.disclosure(false);
<button {...disclosureProps}>
Show Details
</button>
<div id="disclosure-panel">
Hidden content revealed on button click
</div>WCAG 2.1 compliance and Headless UI best practices for your design system
Automatic ARIA attributes, roles, and properties for proper screen reader support.
Complete keyboard support with arrow keys, Enter, Space, Escape, and more.
Proper focus trapping, restoration, and visible focus indicators.
Components are tested with NVDA, JAWS, VoiceOver, and other assistive technologies.
aria-expanded statesaria-controls relationshipstablist and tab rolesaria-selected statesaria-modal and role="dialog"/* Focus ring styles */
focus:outline-none
focus:ring-2
focus:ring-blue-500
focus:ring-offset-2
focus:ring-offset-white
dark:focus:ring-offset-gray-800
/* For Headless UI components */
ui-focus-visible:outline-none
ui-focus-visible:ring-2
ui-focus-visible:ring-blue-500<span className="sr-only">
Additional context for screen readers
</span>
/* CSS */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border: 0;
}