Introduction
The Drift Common React component library provides a comprehensive set of reusable UI components for building consistent, accessible interfaces. These components are organized into specialized categories for different use cases.Component Categories
Tables
A complete suite of table components for displaying structured data with support for responsive layouts, custom styling, and loading states. Key Components:BodyCell,HeaderCell- Individual table cellsBodyRow,HeaderRow,SummaryRow- Row containersTableSkeleton- Full table layout with loading supportTableCellCardValue- Card-style cell values for mobile views
Charts
Chart visualization components designed to work with charting libraries like Recharts. Key Components:ActiveDot- Animated active data point indicator
Loaders
Loading indicators and progress bars for displaying asynchronous states. Key Components:InlineLoadingBar- Compact animated loading indicatorProgressBarThreeColor- Multi-segment progress bar
Installation
All components are available through the main package export:Design Principles
Composition
Components are designed to be composed together. For example, table components work together to build complete table structures:Styling
Components use Tailwind CSS for styling and acceptclassName props for customization. Many components use tailwind-merge to intelligently merge custom classes with default styles.
TypeScript Support
All components are written in TypeScript with full type definitions for props and exports.Common Props
Many components share common prop patterns:className- Custom CSS classes to merge with component defaultschildren- React children for content compositiononClick- Click event handlersdataPuppetTag- Test automation identifiers