@brycks/core-front
v0.3.5
Published
Brycks Design System - A modern, calm, and tactile UI component library
Maintainers
Readme
Brycks Core Front
A modern, calm, and tactile UI component library for React. Inspired by Apple's design language.
Features
- Design System First: Comprehensive tokens for colors, typography, spacing, shadows, and motion
- Theme Support: Built-in light and dark themes with easy customization
- Fully Typed: Complete TypeScript support with exported types
- Accessible: ARIA-compliant components with keyboard navigation
- Zero Dependencies: No external dependencies (except React peer dependency)
- Tree-Shakeable: Import only what you need
Installation
npm install @brycks/core-front
# or
pnpm add @brycks/core-frontQuick Start
import { ThemeProvider, Button, Text, Stack } from '@brycks/core-front'
import '@brycks/core-front/styles.css'
function App() {
return (
<ThemeProvider>
<Stack gap={4} p={6}>
<Text variant="bodyLarge">Welcome to Brycks</Text>
<Button intent="primary">Get Started</Button>
</Stack>
</ThemeProvider>
)
}Components
Layout
Box- Polymorphic layout primitiveStack/HStack/VStack- Flexbox stack layoutsGrid/GridItem- CSS Grid layoutsContainer- Responsive container
Typography
Text- Body text with variantsHeading/Display- Semantic headings
Primitives
Button/IconButton- Interactive buttons
Form
Input- Base inputTextField- Input with label and validationSelect- Native selectCheckbox- Checkbox with labelSwitch- Toggle switchTextarea- Multi-line input
Feedback
Modal- Dialog/modal windowAlert- Contextual alertsTooltip- Hover tooltips
Utility
Badge- Status badgesLoader/Spinner- Loading indicatorsSkeleton- Loading placeholdersDivider- Content separatorsEmptyState- Zero-state displays
Theming
Using the Theme Provider
import { ThemeProvider } from '@brycks/core-front'
function App() {
return (
<ThemeProvider
config={{
defaultMode: 'system', // 'light' | 'dark' | 'system'
light: {
// Override light theme colors
primary: {
default: '#your-brand-color',
},
},
}}
>
{/* Your app */}
</ThemeProvider>
)
}Accessing Theme
import { useTheme, useThemeColors } from '@brycks/core-front'
function MyComponent() {
const { mode, toggleMode } = useTheme()
const colors = useThemeColors()
return (
<button onClick={toggleMode}>
Current mode: {mode}
</button>
)
}Design Tokens
Import tokens directly for custom components:
import { colors, spacing, radii, shadows } from '@brycks/core-front/tokens'
const myStyles = {
padding: spacing[4],
borderRadius: radii.md,
boxShadow: shadows.md,
color: colors.primary[600],
}CSS Variables
All theme colors are available as CSS variables:
.my-element {
background: var(--brycks-background-app);
color: var(--brycks-foreground-default);
border: 1px solid var(--brycks-border-default);
}Development
# Install dependencies
pnpm install
# Start development server
pnpm dev
# Build library
pnpm build
# Type check
pnpm typecheckLicense
MIT
