@greenloom/loom-core
v0.20.0
Published
Core utilities and shared functionality for Loom UI
Maintainers
Readme
@razorpay/blade-core
Core utilities and shared functionality for Blade Design System.
Installation
npm install @razorpay/blade-core
# or
yarn add @razorpay/blade-coreUsage
Import everything
import { colors, spacing, makeBezier, cloneDeep } from '@razorpay/blade-core';Import specific modules
// Import tokens
import { colors, spacing, typography } from '@razorpay/blade-core/tokens';
// Import utilities
import { makeBezier, cloneDeep, isEmpty } from '@razorpay/blade-core/utils';What's included
Tokens
- Colors - Design system color tokens
- Spacing - Spacing scale tokens
- Typography - Font family, size, and weight tokens
- Motion - Animation duration, delay, and easing tokens
- Border - Border radius and width tokens
- Breakpoints - Responsive breakpoint tokens
- Elevation - Shadow and elevation tokens
- Size - Size scale tokens
- Opacity - Opacity value tokens
Utilities
- lodashButBetter - Lightweight utility functions
capitalize- Capitalize stringsclamp- Clamp numbers between min/maxcloneDeep- Deep clone objectsdebounce- Debounce functionsget- Get nested object propertiesisEmpty- Check if values are emptyisNumber- Check if value is a numberisObject- Check if value is an objectisUndefined- Check if value is undefinedkebabCase- Convert to kebab-casekeys- Get object keysmerge- Deep merge objectsthrottle- Throttle functions
- Platform - Platform detection utilities
- Logger - Logging and error utilities
- makeBezier - CSS cubic-bezier generation
- Types - TypeScript type definitions
Development
Build
yarn buildType checking
# Check all platforms
yarn typecheck
# Check specific platform
yarn typecheck:web
yarn typecheck:nativeLicense
MIT
