React TypeScript component library
npm install @true-tech-team/react-componentsA comprehensive React component library built with TypeScript, SCSS Modules, and featuring a robust theming system with dark/light mode support.
- 🎨 Comprehensive Theming - 37 color families with 10 shades each (370+ colors)
- 🌓 Dark/Light Mode - Built-in theme switching with CSS variables
- 📏 4px Grid System - Consistent spacing throughout
- 🎯 Type-Safe - Full TypeScript support with comprehensive types
- 🧩 Component Library - Reusable, customizable components
- 🎭 Icon System - SVG-based icons with easy customization
- 🛠️ Utility Classes - 500+ utility classes for rapid development
- 📦 Tree-Shakeable - Optimized bundle sizes
- ♿ Accessible - Built with accessibility in mind
``bash`
npm install @true-tech-team/ui-components
`tsx
import { GlobalProvider } from '@true-tech-team/ui-components';
function App() {
return (
);
}
`
`tsx
import { Button, Icon } from '@true-tech-team/ui-components';
function MyComponent() {
return (
}>
Save
Components
$3
#### Button
Versatile button component with multiple variants and sizes.
`tsx
}>
With Icon
`Variants: primary, secondary, outline, ghost
Sizes: sm, md, lg
#### IconButton
Button component optimized for icon-only display.
`tsx
`$3
#### Icon
SVG-based icon system with customizable size and color.
`tsx
`Available icons: chevron-down, chevron-up, chevron-left, chevron-right, close, check, info, warning, error, eye, eye-off, user, users, building, dollar, chart-line, chart-bar, trending-down, and more
#### Avatar
User profile avatars with image, initials, and icon variants.
`tsx
} variant="secondary" />
`Sizes: xs, sm, md, lg, xl
Variants: primary, secondary, tertiary
#### Badge
Notification badges with count display.
`tsx
`#### Chip
Interactive chips for tags and selections.
`tsx
{}} />
`#### Pill
Status and category pills.
`tsx
`#### Tag
Labeling and categorization tags.
`tsx
New
Available
`#### StatusIndicator
Status indicator dots with labels.
`tsx
`#### ProgressBar
Linear progress bars with labels and variants.
`tsx
`#### CircularProgress
Circular progress indicators.
`tsx
`#### Skeleton
Loading skeleton screens for content placeholders.
`tsx
`#### KPI
Key Performance Indicator display component.
`tsx
value="$45,231"
label="Total Revenue"
trend={12.5}
trendDirection="up"
icon={ }
/>
`#### Stat
Statistical display component for metrics.
`tsx
`#### List
Comprehensive list component with selection, virtualization, and keyboard navigation.
`tsx
items={users}
renderItem={(user) => (
key={user.id}
primary={user.name}
secondary={user.email}
icon={ }
/>
)}
selectable
onSelectionChange={(selected) => console.log(selected)}
/>
`#### Table
Data table component with sorting, selection, and pagination.
`tsx
data={users}
columns={[
{ key: 'name', header: 'Name', sortable: true },
{ key: 'email', header: 'Email' },
{ key: 'role', header: 'Role', sortable: true },
]}
selectable
pagination={{ pageSize: 10 }}
onSort={(key, direction) => console.log(key, direction)}
/>
`$3
#### SortableList
Reorderable list with drag-and-drop functionality.
`tsx
items={items}
onReorder={(newOrder) => setItems(newOrder)}
renderItem={(item) => (
{item.label}
)}
/>
`#### SortableGrid
Reorderable grid layout with drag-and-drop.
`tsx
items={gridItems}
columns={3}
onReorder={(newOrder) => setGridItems(newOrder)}
renderItem={(item) => {item.content} }
/>
`#### KanbanBoard
Kanban-style board with draggable cards between columns.
`tsx
columns={[
{ id: 'todo', title: 'To Do', items: todoItems },
{ id: 'progress', title: 'In Progress', items: progressItems },
{ id: 'done', title: 'Done', items: doneItems },
]}
onCardMove={(cardId, fromColumn, toColumn) => handleMove(cardId, fromColumn, toColumn)}
/>
`#### ResizablePanels
Resizable panel layouts for split views.
`tsx
`$3
#### Filter System
Comprehensive filtering system with various field types and layouts.
`tsx
console.log(filters)}>
field="status"
label="Status"
options={[
{ value: 'active', label: 'Active' },
{ value: 'inactive', label: 'Inactive' },
]}
/>
`$3
#### Input
Text input with validation, formatting, and various configurations.
`tsx
label="Email"
type="email"
placeholder="Enter your email"
validation={(value) =>
value.includes('@') ? { valid: true } : { valid: false, message: 'Invalid email' }
}
/>
`#### Autocomplete
Input with dropdown suggestions and filtering.
`tsx
options={[
{ value: '1', label: 'Option 1' },
{ value: '2', label: 'Option 2' },
]}
placeholder="Search..."
/>
`#### Select
Dropdown select component with search and custom rendering.
`tsx
options={[
{ value: 'us', label: 'United States' },
{ value: 'ca', label: 'Canada' },
]}
placeholder="Select country"
/>
`#### Checkbox
Checkbox input with labels and indeterminate state.
`tsx
`#### Radio & RadioGroup
Radio button inputs with group management.
`tsx
`#### Toggle
Switch/toggle component for boolean states.
`tsx
`#### Textarea
Multi-line text input with auto-resize.
`tsx
`#### NumberInput
Numeric input with increment/decrement controls.
`tsx
`#### PhoneInput
International phone number input with country selection.
`tsx
`#### Slider
Range slider with marks and custom formatting.
`tsx
`#### Rating
Star rating input component.
`tsx
`#### TagInput
Input for managing multiple tags.
`tsx
`#### FilePicker
File upload component with drag-and-drop support.
`tsx
accept=".pdf,.doc,.docx"
maxSize={5 1024 1024}
onChange={(files) => console.log(files)}
/>
`#### ColorPicker
Color selection with multiple format support (hex, rgb, hsl).
`tsx
`#### DatePicker
Single date selection with calendar interface.
`tsx
`#### DateRangePicker
Date range selection with presets.
`tsx
startDate={startDate}
endDate={endDate}
onChange={(start, end) => {
setStartDate(start);
setEndDate(end);
}}
presets={[{ label: 'Last 7 days', value: { start: -7, end: 0 } }]}
/>
`$3
#### Portal
Render children in a different part of the DOM.
`tsx
This renders at document.body
`#### Popover
Floating content positioned relative to a trigger.
`tsx
Open Popover} content={Popover content} />
`#### Tooltip
Hover tooltip with customizable positioning.
`tsx
`#### Dropdown
Dropdown menu with trigger and content.
`tsx
trigger={}
content={
}
/>
`#### Menu
Flexible menu system with items, groups, and dividers.
`tsx
`$3
#### Stepper
Multi-step progress indicator for wizard-like interfaces.
`tsx
`#### Breadcrumbs
Navigation breadcrumb trail for hierarchical page structure.
`tsx
Home
Products
Current Page
`#### Navbar
Responsive navigation bar with collapsible menu support.
`tsx
My App
Home
About
`#### SideNav
Sidebar navigation with groups, items, and dividers.
`tsx
} href="/">
Dashboard
} href="/users">
Users
} href="/settings">
Settings
`#### Pagination
Page navigation with customizable controls.
`tsx
`#### BottomNavigation
Mobile-friendly bottom navigation bar.
`tsx
} label="Home" value="home" />
} label="Search" value="search" />
} label="Profile" value="profile" />
`#### Tabs
Tabbed content navigation.
`tsx
Tab 1
Tab 2
Content 1
Content 2
`$3
#### Panes
Resizable split pane layouts.
`tsx
Left Panel
Right Panel
`#### ResponsiveStack
Stack layout that adapts to screen size.
`tsx
Item 1
Item 2
`#### AdaptiveGrid
Auto-adjusting grid layout based on container width.
`tsx
Item 1
Item 2
Item 3
`#### MasonryLayout
Pinterest-style masonry grid for variable-height items.
`tsx
Short content
Much longer content that takes more space
Medium content
`$3
#### FormBuilder
Dynamic form builder with validation and state management.
`tsx
fields={[
{
name: 'email',
label: 'Email',
type: 'email',
required: true,
validation: { pattern: /^[^\s@]+@[^\s@]+\.[^\s@]+$/ },
},
{
name: 'password',
label: 'Password',
type: 'password',
required: true,
},
]}
onSubmit={(values) => console.log(values)}
/>
`Theming
$3
The library includes a comprehensive theming system with 37 color families and 10 shades each, providing 370+ colors out of the box.
`tsx
import { GlobalProvider } from '@true-tech-team/ui-components';function App() {
return (
themeConfig={{
mode: 'light',
// Optional: override theme values
overrides: {
colors: {
primary: '#007bff',
},
},
}}
>
);
}
`$3
`tsx
import { useTheme } from '@true-tech-team/ui-components';function ThemeToggle() {
const { mode, toggleMode } = useTheme();
return ;
}
`$3
All theme values are exposed as CSS variables for easy customization:
`css
.custom-element {
color: var(--theme-primary);
background: var(--theme-surface);
border-radius: var(--theme-radius-md);
padding: var(--theme-spacing-4);
}
`$3
Spacing (4px grid):
`html
Margin 16px, Padding 8px
Margin top 8px, bottom 16px, padding x 24px
`Flexbox:
`html
...
...
`Grid:
`html
...
`Colors:
`html
...
...
`Typography:
`html
Heading
Small text
`Utility Functions
$3
`tsx
import { getThemeValue, setThemeValue, pxToRem, gridSpacing } from '@true-tech-team/ui-components';// Get theme values
const primaryColor = getThemeValue('--theme-primary');
// Convert pixels to rem
const remValue = pxToRem(16); // '1rem'
// Grid-based spacing
const spacing = gridSpacing(4); // '16px' (4 * 4px grid)
`$3
`tsx
import { hexToRgb, rgbToHsl, isLightColor, getBrightness } from '@true-tech-team/ui-components';const rgb = hexToRgb('#ff0000'); // { r: 255, g: 0, b: 0 }
const hsl = rgbToHsl(255, 0, 0); // { h: 0, s: 100, l: 50 }
const isLight = isLightColor('#ffffff'); // true
`$3
`tsx
import { formatDate, getDaysInMonth, isDateInRange, addDays } from '@true-tech-team/ui-components';const formatted = formatDate(new Date(), 'YYYY-MM-DD');
const daysInMonth = getDaysInMonth(2024, 0); // January 2024
const inRange = isDateInRange(date, startDate, endDate);
const futureDate = addDays(new Date(), 7);
`$3
`tsx
import { validators, combineValidators } from '@true-tech-team/ui-components';const emailValidator = validators.email();
const requiredValidator = validators.required('This field is required');
const combined = combineValidators([requiredValidator, emailValidator]);
const result = combined('test@example.com');
`Development
$3
`bash
Build library for production
nx build ui-components --configuration=productionBuild for development
nx build ui-components --configuration=development
`The build output will be in
dist/libs/ui-components/.$3
`bash
Run tests
nx test ui-componentsRun tests in watch mode
nx test ui-components --watchRun tests with coverage
nx test ui-components --coverage
`$3
`bash
Lint
nx lint ui-componentsLint and fix
nx lint ui-components --fix
`$3
View and interact with all components in Storybook:
`bash
Start Storybook dev server
nx storybook ui-componentsBuild Storybook static site
nx build-storybook ui-components
``Storybook will be available at http://localhost:6006.
- Chrome (latest)
- Firefox (latest)
- Safari (latest)
- Edge (latest)
This library is written in TypeScript and includes type definitions. All components, props, and utilities are fully typed for the best development experience.
Contributions are welcome! Please ensure all tests pass and follow the existing code style.
True Tech Team UI Components Github
True Tech Team React Components
MIT