Core utilities, tokens and hooks for X-UI
npm install @xdev-asia/x-ui-coreCore utilities, design tokens, and hooks for X-UI component library.
``bash`
pnpm add @xdev-asia/x-ui-coreor
npm install @xdev-asia/x-ui-core
- 🎨 Design Tokens - Colors, spacing, typography, shadows
- 🔧 Utilities - Common helper functions
- 🪝 Hooks - Reusable React hooks (useResponsive, useBreakpoint)
- 📐 Responsive - Breakpoint utilities for responsive design
`ts
import { colors, spacing, typography, breakpoints } from '@xdev-asia/x-ui-core/tokens';
// Colors
console.log(colors.primary[500]); // Primary color shade 500
// Spacing
console.log(spacing[4]); // "1rem"
// Typography
console.log(typography.sizes.md); // Medium font size
`
`ts
import { createResponsiveValue, getBreakpointValue } from '@xdev-asia/x-ui-core';
const value = getBreakpointValue({
base: 4,
md: 6,
lg: 8,
}, 'md');
// Returns: 6
`
| Name | Min Width |
|------|-----------|
| sm | 0px |md
| | 768px |lg
| | 1024px |xl
| | 1280px |2xl` | 1536px |
|
- @xdev-asia/x-ui-react - React components
MIT