Overview
Trazea uses a comprehensive set of reusable UI components built on top of Radix UI primitives and styled with Tailwind CSS. These components follow a consistent design system and include full TypeScript support.Form Components
Input
A styled input component with focus states and validation support. Location:src/shared/ui/input.tsx
Props
Extends all native HTML input attributes:className- Additional CSS classestype- Input type (text, email, password, etc.)
Usage
Select
A customizable select dropdown built with Radix UI. Location:src/shared/ui/select.tsx
Components
Select- Root componentSelectTrigger- Button that opens the dropdownSelectContent- Dropdown content containerSelectItem- Individual optionSelectValue- Displays selected valueSelectGroup- Groups related itemsSelectLabel- Label for groupsSelectSeparator- Visual separator
Usage
DatePicker
A date picker component with calendar popup. Location:src/shared/ui/date-picker.tsx
Props
Usage
Button Components
Button
A versatile button component with multiple variants and sizes. Location:src/shared/ui/button.tsx
Variants
default- Primary button with brand colorsdestructive- Red button for destructive actionsoutline- Button with border and transparent backgroundsecondary- Secondary button styleghost- Minimal button without backgroundlink- Text button with underline on hover
Sizes
default- Standard height (h-9)sm- Small button (h-8)lg- Large button (h-10)icon- Square button for icons (size-9)icon-sm- Small icon button (size-8)icon-lg- Large icon button (size-10)
Props
Usage
Badge
Small label component for status indicators. Location:src/shared/ui/badge.tsx
Variants
default- Primary brand colorssecondary- Secondary colorsdestructive- Red for errors/warningsoutline- Bordered badge
Usage
Layout Components
Card
Container component for content sections. Location:src/shared/ui/card.tsx
Components
Card- Root containerCardHeader- Header section with titleCardTitle- Main titleCardDescription- Subtitle or descriptionCardAction- Action buttons in headerCardContent- Main content areaCardFooter- Footer section
Usage
Table
Table components for displaying tabular data. Location:src/shared/ui/table.tsx
Components
Table- Root table with scroll containerTableHeader- Table header sectionTableBody- Table bodyTableFooter- Table footerTableRow- Table rowTableHead- Header cellTableCell- Data cellTableCaption- Table caption
Usage
Dialog Components
Dialog
Modal dialog component built with Radix UI. Location:src/shared/ui/dialog.tsx
Components
Dialog- Root componentDialogTrigger- Button that opens dialogDialogContent- Dialog content containerDialogHeader- Header sectionDialogTitle- Dialog titleDialogDescription- Dialog descriptionDialogFooter- Footer with actionsDialogClose- Close button
Usage
Loading Components
Loader
Customizable loading indicator with multiple variants. Location:src/shared/ui/loader.tsx
Variants
spinner- Rotating spinnerdots- Bouncing dotspulse- Pulsing circlebars- Animated bars
Sizes
sm,md,lg,xl
Usage
LoadingOverlay
Overlay component that displays loading state over content. Location:src/shared/ui/loading-overlay.tsx
Components
LoadingOverlay- Standard overlayPageLoadingOverlay- Full page overlayProgressOverlay- Overlay with progress barCustomLoadingOverlay- Overlay with custom content
Usage
Theme Components
ModeToggle
Theme switcher component for light/dark mode. Location:src/shared/ui/mode-toggle.tsx
Usage
Styling
All components use thecn() utility function to merge Tailwind CSS classes:
Accessibility
- All components include proper ARIA attributes
- Keyboard navigation is fully supported
- Focus states are clearly visible
- Screen reader labels are included where necessary
Related
- Utilities - Helper functions including
cn() - Radix UI Documentation - Underlying component library
- Tailwind CSS - Styling framework