@hellajs/ui
v0.0.1
Published
A collection of reactive UI components built with HellaJS.
Readme
@hellajs/ui
A collection of reactive UI components built with HellaJS.
Installation
npm install @hellajs/ui @hellajs/core @hellajs/css @hellajs/domFeatures
- Reactive UI components with HellaJS primitives
- CSS-in-JS styling with @hellajs/css
- Theme support with light/dark mode
- Customizable color palettes
- Zero runtime dependencies (peer dependencies only)
Components
Buttons
button- Base button stylesbuttonColor- Colored button variantsbuttonOutline- Outlined button stylebuttonSoft- Soft button stylebuttonRounded- Rounded button variantbuttonFull- Full-width buttonbuttonIcon- Icon button stylebuttonScale- Size variants (sm/lg)buttonModule- Complete button system
Inputs
input- Base input stylesinputOutline- Outlined input variantinputFilled- Filled input variantinputUnderline- Underline input styleinputRounded- Rounded input cornersinputScale- Size variants (sm/lg)textarea- Textarea stylesinputModule- Complete input system
Select
select- Base select stylesselectOutline- Outlined select variantselectFilled- Filled select variantselectRounded- Rounded select cornersselectScale- Size variants (sm/lg)selectModule- Complete select system
Checkbox & Radio
checkbox- Checkbox stylescheckboxColor- Colored checkbox variantscheckboxScale- Size variants (sm/lg)radio- Radio button stylescheckboxLabel- Label stylescheckboxModule- Complete checkbox system
Switch
switchToggle- Toggle switch stylesswitchColor- Colored switch variantsswitchScale- Size variants (sm/lg)switchLabel- Switch label stylesswitchModule- Complete switch system
Labels
label- Base label styleslabelRequired- Required field indicatorhelperText- Helper text styleserrorText- Error message stylessuccessText- Success message styleslabelModule- Complete label system
Table
table- Base table stylestableContainer- Table wrappertableStriped- Striped rowstableBordered- Bordered tabletableBorderedCells- Cell borderstableHover- Hover effectstableCompact- Compact spacingtableSticky- Sticky headertableColor- Colored table variantstableScale- Size variants (sm/lg)tableModule- Complete table system
Tabs
tabList- Tab list containertab- Individual tab stylestabPanel- Tab panel contenttabColor- Colored tab variantstabUnderline- Underline tab styletabPills- Pill-style tabstabPillsColor- Colored pill tabstabPillsColorUnselected- Unselected pill colorstabBordered- Bordered tabstabListBordered- Bordered tab listtabPanelBordered- Bordered tab paneltabScale- Size variants (sm/lg)tabsModule- Complete tabs system
Modal
modalModule- Complete modal system with dialog, header, body, footer
Theme & Colors
palette- Create custom color paletteactiveTheme- Current theme signalisDarkTheme- Computed dark mode statecolors- Default color palettecolorKeys- Available color keyspaletteKeys- Monochrome shade keys
Utilities
size- Size helper functionscale- CSS variables for scaling
Usage
import { mount } from "@hellajs/dom";
import { buttonModule, colors, colorKeys } from "@hellajs/ui";
// Initialize button system with color palette
buttonModule(colorKeys);
// Use button styles in components
mount(() => {
return <button class={button()}>Click me</button>;
});Theming
import { palette, activeTheme, isDarkTheme } from "@hellajs/ui";
// Create custom palette
const myColors = palette({
neutral: "#737b8c",
primary: "#1260e6",
accent: "#e67112"
});
// Toggle theme
activeTheme.set("dark");License
MIT
