Introduction
The@repo/ui package is Openlane’s internal component library that provides a collection of reusable React components built on top of Radix UI primitives and styled with Tailwind CSS v4. The library follows modern design patterns and includes both basic UI elements and complex composite components.
Architecture
The component library is structured as a monorepo package with the following characteristics:- Framework Agnostic: Built with React 19.2.4 and can be used in any React application
- TypeScript First: Full TypeScript support with comprehensive type definitions
- Modular Exports: Each component is exported individually to enable tree-shaking
- Design System: Consistent theming with CSS variables and Tailwind v4
- Accessibility: Built on Radix UI primitives for WAI-ARIA compliance
Component Categories
The library includes over 50 components organized into the following categories:Form Components
Input, Textarea, Select, Checkbox, Radio Group, Switch, Form, Password Input, Tag Input, Input OTP, Multiple Selector
Action Components
Button, Alert Dialog, Confirmation Dialog, Dialog, Sheet, Dropdown Menu, Command
Data Display
Table, Data Table, Badge, Avatar, Card Panel, Panel, Tag, Pagination, Progress Circle
Navigation
Breadcrumb, Tabs, Separator, Page Heading
Feedback
Alert, Toast, Toaster, Tooltip, System Tooltip, Info, Message Box
Data Entry
Calendar, Calendar Popover, Date Picker, Slider
Layout
Grid, Panel, Card Panel, Popover
Rich Content
Plate UI (Rich text editor components), Chart, Line Chart, Donut Chart
Key Features
Variant-Based Styling
Components use class-variance-authority (CVA) for type-safe variant styling:Composition Pattern
Many components follow a composition pattern for flexibility:Form Integration
Seamless integration with React Hook Form:Dark Mode Support
All components support dark mode out of the box using CSS variables:Utility Functions
The library includes helper utilities:cn() - Class Name Merger
Combinesclsx and tailwind-merge for intelligent class merging:
Design Tokens
The component library uses a comprehensive set of design tokens defined in CSS variables:- Colors: Primary, secondary, accent, destructive, muted, etc.
- Spacing: Consistent padding and margin scales
- Typography: Font families, sizes, and weights
- Borders: Border radius and border colors
- Shadows: Elevation system for depth
Dependencies
The library leverages industry-standard dependencies:Core Dependencies
Core Dependencies
- React 19.2.4: Latest React with concurrent features
- Radix UI: Unstyled, accessible components
- Tailwind CSS 4.1.13: Utility-first CSS framework
- class-variance-authority: Type-safe component variants
- lucide-react: Beautiful, consistent icons
Form & Validation
Form & Validation
- react-hook-form: Performant form library
- @hookform/resolvers: Schema validation resolvers
- zod: TypeScript-first schema validation
Rich Content
Rich Content
- platejs: Plate rich text editor
- @platejs/*: Plate plugins for tables, markdown, AI, etc.
- recharts: Composable charting library
Advanced Features
Advanced Features
- @tanstack/react-table: Headless table library
- date-fns: Modern date utility library
- sonner: Toast notifications
- cmdk: Command palette component
Package Structure
The package follows a modular structure:Export Structure
Components are exported individually for optimal tree-shaking:Next Steps
Installation
Learn how to install and configure the component library
Usage Guide
Explore basic usage patterns and examples
Theming
Customize components with Tailwind CSS v4
Storybook
Browse components in Storybook