Components
Ezvento's UI is built on shadcn/ui primitives (Base UI + Tailwind v4) and a growing library of domain-specific custom components. This page catalogs every component, its location, and its purpose.
shadcn/ui Primitives
27 base components in
src/components/ui/. All wrap @base-ui/react primitives (not Radix) and use Tailwind v4 + CVA for variants.| Component | File Path | Key Notes |
|---|---|---|
| Avatar | src/components/ui/avatar.tsx | User avatars with fallback initials. Uses @base-ui/react. |
| Badge | src/components/ui/badge.tsx | Status labels with CVA variants (default, secondary, destructive, outline). |
| Breadcrumb | src/components/ui/breadcrumb.tsx | Navigation breadcrumbs with separators and collapsible items. |
| Button | src/components/ui/button.tsx | Primary CTA with loading state. CVA variants: default, destructive, outline, ghost, link. |
| Card | src/components/ui/card.tsx | Content containers with header, content, footer sub-components. |
| Checkbox | src/components/ui/checkbox.tsx | Accessible checkbox with indeterminate state support. |
| Command | src/components/ui/command.tsx | Command palette / searchable dropdown powered by cmdk. |
| Dialog | src/components/ui/dialog.tsx | Modal overlays with focus trap and backdrop blur. |
| DropdownMenu | src/components/ui/dropdown-menu.tsx | Context menus, nested submenus, checkable items. |
| Form | src/components/ui/form.tsx | React Hook Form integration primitives (FormField, FormItem, FormLabel, etc.). |
| ImageUpload | src/components/ui/image-upload.tsx | Drag-and-drop image upload with preview and delete. |
| Input | src/components/ui/input.tsx | Text inputs with built-in error state styling. |
| InputGroup | src/components/ui/input-group.tsx | Grouped inputs with prefix/suffix addons and icons. |
| Label | src/components/ui/label.tsx | Form labels with accessibility bindings. |
| PageHeader | src/components/ui/page-header.tsx | Consistent page titles with breadcrumb slot and actions. |
| ResponsiveModal | src/components/ui/responsive-modal.tsx | Dialog on desktop, full-screen Sheet on mobile. Core responsive pattern. |
| ScrollArea | src/components/ui/scroll-area.tsx | Custom scrollable region with native-feeling scrollbars. |
| Select | src/components/ui/select.tsx | Single and multi-select dropdowns with search. |
| Separator | src/components/ui/separator.tsx | Visual dividers with label support. |
| Sheet | src/components/ui/sheet.tsx | Slide-in panels from any edge. Used for mobile sidebar and forms. |
| Skeleton | src/components/ui/skeleton.tsx | Loading placeholder with shimmer animation. |
| Sonner | src/components/ui/sonner.tsx | Toast notifications via sonner library. |
| Switch | src/components/ui/switch.tsx | Toggle switch with label and form integration. |
| Table | src/components/ui/table.tsx | Data tables with header, body, row, cell, caption. |
| Tabs | src/components/ui/tabs.tsx | Tabbed content panels with keyboard navigation. |
| Textarea | src/components/ui/textarea.tsx | Multi-line text input with auto-resize support. |
Key Patterns — Forms
Every form uses the React Hook Form + Zod + shadcn Form primitives stack.
zodResolverfrom@hookform/resolversvalidates on submit and blur.FormFieldwires RHF controllers to shadcn inputs.- Server errors are pushed into form state via
setErrorso inline messages appear next to fields. - Loading states disable submit buttons and show skeletons for async selects.
Key Patterns — Tables
- Hover and selected states use
hover:bg-muted/40anddata-[state=selected]:bg-blue-50. - Sticky headers via
sticky top-0 z-10. - Empty states render a centered icon + message inside the first row when data is empty.
- Action columns (edit, delete) are right-aligned with compact icon buttons.
Key Patterns — Dialogs & Sheets
- ResponsiveModal is the canonical pattern: a
Dialogon desktop becomes a full-screenSheeton mobile. - All dialogs have a close button, focus trap, and
ESCto dismiss. - Form dialogs disable the submit button while mutating to prevent double-submission.
- Destructive actions (delete, cancel) use a red outline or ghost variant with a confirmation step.
Key Patterns — Cards
Cards use the shadow-card / shadow-card-hover / shadow-card-lg utility classes defined in globals.css.
- Stat cards have gradient icon backgrounds (
stat-icon-blue,stat-icon-emerald, etc.). - Quick action cards lift on hover with
action-cardutility. - Card borders are subtle (
border-border/50) to match the glassmorphism aesthetic.
Key Patterns — Navigation
- Sidebar nav items use the
nav-activeutility: a blue left-bar indicator with subtle gradient background. - Mobile bottom tab bar shows 5 slots: Dashboard, Stock, New Billing (FAB center), Products, More.
- Breadcrumbs are built with the
Breadcrumbprimitive and shown inPageHeader. - All nav is filtered by RBAC via the
menuAccessmap returned from/api/auth/permissions.