The Calendar component from @dashflowx/core provides a visual date picker interface with multiple variants and sizes. It's perfect for forms, booking systems, and scheduling applications.
import { Calendar } from '@dashflowx/core'export default function CalendarExample() {return (<Calendarmode="single"/>)}
Preview:
| Prop | Type | Default | Description |
|---|---|---|---|
mode | 'single' | 'multiple' | 'range' | 'single' | The selection mode for the calendar |
className | string | '' | Additional CSS classes for styling |
variant | 'default' | 'bordered' | 'filled' | 'outlined' | 'ghost' | 'gradient' | 'default' | Visual variant of the calendar |
size | 'sm' | 'md' | 'lg' | 'xl' | 'md' | Size of the calendar component |
The Calendar component supports multiple visual variants to match your design system:
<Calendar size="sm" />
Preview:
<Calendar size="md" />
Preview:
<Calendar size="lg" />
Preview:
<Calendar size="xl" />
Preview:
<Calendar mode="single" />
Preview:
<Calendar mode="multiple" />
Preview:
<Calendar mode="range" />
Preview:
<Calendar />
Preview:
<Calendarvariant="bordered"size="lg"className="my-4"/>
Preview:
Choose the right mode: Use
singlefor simple date selection,multiplefor selecting several dates, andrangefor date ranges.Select appropriate variants: Use variants that match your design system and provide good contrast for accessibility.
Consider sizing: Use
smfor compact spaces,mdfor standard forms, andlg/xlfor prominent displays.Accessibility: The component includes proper ARIA labels and keyboard navigation support.
- Keyboard Navigation: Full keyboard support for navigation and selection
- Screen Reader Support: Proper ARIA labels and descriptions
- Focus Management: Clear focus indicators and logical tab order
- High Contrast: Variants designed for good contrast ratios
