@pinset/ui
v0.1.7
Published
Themeable React component library for Pinset platform
Downloads
39
Maintainers
Readme
@pinset/ui
Themeable React component library for Pinset platform applications.
Installation
npm install @pinset/ui @pinset/tokensUsage
import { ThemeProvider, Button, Card, CardBody, Badge } from '@pinset/ui'
import '@pinset/tokens' // Design tokens
import '@pinset/ui/styles.css' // Component styles
function App() {
return (
<ThemeProvider>
<Card>
<CardBody>
<Badge variant="success">Active</Badge>
<Button>Click me</Button>
</CardBody>
</Card>
</ThemeProvider>
)
}Components
Layout
Card,CardHeader,CardBody,CardTitle
Form
Button- primary, secondary, accent, danger, ghostInput- Text input with label and errorTextarea- Multi-line text inputSelect- Dropdown select
Feedback
Badge- default, primary, accent, success, warning, errorModal- Dialog overlay
Theme
ThemeProvider- Theme context providerThemeSwitcher- Theme and color mode pickerThemeSwitcherCompact- Compact color mode toggleuseTheme- Hook for accessing theme context
Themes
Available themes from @pinset/tokens:
| Theme | Description |
|-------|-------------|
| classic | Bold primaries, high contrast |
| earth | Warm, earthy tones |
| ocean | Blue-focused, clean aesthetic |
| forest | Dark organic, natural accents |
Custom Storage Key
<ThemeProvider storageKeyPrefix="myapp">
{/* Uses 'myapp-theme' and 'myapp-color-mode' in localStorage */}
</ThemeProvider>License
MIT
