Reference

API Reference

Exported symbols from every @stareezy-ui/* package — types, functions, hooks, and components.

All packages are written in TypeScript with strict mode. Type definitions are bundled in each package's dist/ output — no separate @types/* packages are needed.

@stareezy-ui/tokens

Zero-dependency token definitions and the createUi() configuration factory. This package builds first in the dependency chain.

import { createUi, t, token, colors, spacing, radius, themes } from '@stareezy-ui/tokens'
ExportKindDescription
createUi(config)functionConfiguration factory. Returns a typed UiConfig with t, tokens, shorthands, breakpoints, and helper methods.
token(value, id?)functionCreate a typed Token<T> object. Used to define custom token values.
tconstantGlobal ThemeToken accessor. Access semantic color slots (t.text.primary, t.backgrounds.primary, etc.).
themesconstantBuilt-in theme maps: themes.aurora, themes.dark, themes.light, themes['steins-gate'], themes.quasar.
colorsconstantColor palette tokens. Access via colors.celurenBlue[500].value.
spacingconstantSpacing scale tokens. Access via spacing[4].value.
radiusconstantBorder radius tokens. Access via radius.md.value.
typographyconstantTypography scale tokens for font sizes, weights, and line heights.
motionconstantAnimation tokens for duration, easing, and delay values.
ThemeProvidercomponent"use client" provider that supplies the active theme to all descendant components.
useTheme()hookReturns the full resolved theme object for the nearest ThemeProvider.
useThemeSwitch()hookReturns { theme, setTheme, toggleTheme, isDark } for controlling the active theme.
useThemeTokens()hookReturns the raw ThemeTokenMap (same as useTheme but returns token objects, not values).
Token<T>typeThe base token type: { __token: true, value: T, id?: string }.
ThemeTokentypeA theme-reactive token reference — resolves at render time via the Theme_Accessor.
SzrCustomConfigtypeModule-augmentation interface. Extend with typeof ui to inject custom media/shorthands into the type system.
ConfigBreakpointKeytypeThe derived BreakpointKey union — 'base' plus your declared media keys (or defaults if unaugmented).
DefaultBreakpointKeytype"base" | "sm" | "md" | "lg" | "xl" | "2xl" — the fallback when SzrCustomConfig is unaugmented.
Responsive<T>typeT | Partial<Record<BreakpointKey, T>> — the union type for responsive prop values.
MediaConfigtypeRecord<string, number> — breakpoint name to min-width pixel mapping.

@stareezy-ui/components

31 cross-platform UI components (26 existing + 6 new in v0.4) plus layout primitives and shared types.

import { Box, Button, Input, Modal, Breadcrumb, Drawer } from '@stareezy-ui/components'
// RSC-safe primitives:
import { Box, Stack, Text } from '@stareezy-ui/components/server'
ExportKindDescription
BoxcomponentThe core layout and styling primitive. Accepts BoxProps including responsive layout and shorthand props.
ViewcomponentAlias for Box with React Native semantics.
StackcomponentFlex column container — convenience wrapper around Box.
HStackcomponentFlex row container with gap support.
VStackcomponentFlex column container with gap support.
TextcomponentTheme-reactive text primitive with typography token support.
DividercomponentHorizontal or vertical separator with optional label.
ButtoncomponentCross-platform button — 12 variants, 5 sizes, loading and disabled states.
InputcomponentText input with focus ring, error state, icons, and prefix/suffix slots.
AccordioncomponentCollapsible content sections with smooth animation.
AvatarcomponentUser avatar with image, initials fallback, and status indicator.
BadgecomponentStatus badge with variants and size options.
BreadcrumbcomponentHierarchical navigation trail with separator customization.
CheckboxcomponentAnimated checkbox with indeterminate state and label.
CircularProgresscomponentSVG circular progress with animated stroke-dashoffset.
ClipboardcomponentCopy-to-clipboard with visual feedback.
DropdowncomponentSelect with search, option groups, and multi-select.
DrawercomponentSide-panel overlay with placement variants and focus trap.
ModalcomponentOverlay dialog with backdrop blur and size variants.
NavBarcomponentTop navigation bar with left/center/right slot layout.
PaginationcomponentPage navigation with smart range display and keyboard support.
ProgresscomponentLinear progress bar with label, percentage, and gradient variants.
ProgressPanelcomponentMulti-step progress panel with labeled steps.
ResizercomponentResizable container with drag handle.
SkeletoncomponentShimmer loading placeholder in text, circular, and rectangular variants.
SlidercomponentRange input with custom styling and value display.
SpinnercomponentAnimated loading indicator — ring, dots, and pulse variants.
SwitchcomponentAnimated toggle switch with label and size variants.
TablecomponentData table with sortable columns, striped rows, and sticky header.
TabscomponentTab navigation with animated indicator — underline, pills, and card variants.
TagcomponentCompact label chip with variants and removable support.
TooltipcomponentContextual hint overlay with placement and delay options.
CommandPalettecomponentKeyboard-driven command search palette.
BoxLayoutPropstypeShared layout prop type extended by every component — spacing, sizing, flex, custom shorthands, $-props.
extractBoxLayoutProps(props)functionSplits BoxLayoutProps from component-specific props. Returns { layout, rest }.
useThemedColors()hookReturns the active theme's resolved color values. Use in component render to be Theme_Reactive.

@stareezy-ui/components/server

Hook-free, RSC-safe primitives. Safe to use in Next.js App Router Server Components without a "use client" boundary.

ExportKindDescription
BoxcomponentServer-safe Box — resolves tokens via CSS custom properties, no hooks.
ViewcomponentServer-safe View.
StackcomponentServer-safe Stack.
TextcomponentServer-safe Text.
DividercomponentServer-safe Divider.

@stareezy-ui/compiler

Build-time transforms for Vite, Babel, and Metro. Reads stareezy.config.ts automatically.

import { stareezyVitePlugin } from '@stareezy-ui/compiler'
const { stareezyBabelPlugin } = require('@stareezy-ui/compiler')
// Metro: require.resolve('@stareezy-ui/compiler/metro')
ExportKindDescription
stareezyVitePlugin(options?)functionVite plugin — emits the virtual:stareezy-ui/styles module. Reads stareezy.config.ts automatically.
stareezyBabelPlugin(options?)functionBabel plugin — transforms token prop values to atomic CSS class names at build time.
stareezyMetroTransformerconstantMetro transformer for React Native / Expo. Point babelTransformerPath at this module.

@stareezy-ui/cli

First-party scaffolding CLI. Invoke via npx Stareezy or install globally as @stareezy-ui/cli.

npx stareezy create my-app --template next
npx stareezy init
npx stareezy add button input card
ExportKindDescription
create <name> [--template]functionScaffold a new pre-wired project (next | vite | expo).
initfunctionAdd stareezy.config.ts, compiler wiring, and ThemeProvider to an existing project (idempotent).
add <component...>functionInstall one or more components with transitive dependency resolution.

@stareezy-ui/runtime

O(1) style registry with web and React Native adapters. Used internally by the Components_Package — not typically imported directly.

import { configureBreakpoints, getBreakpoints, applyRuntimeBreakpoints } from '@stareezy-ui/runtime'

@stareezy-ui/core

Utilities, platform helpers, and hooks shared across packages. Used internally — only import from this package if you are building on top of Stareezy-ui internals.

@stareezy-ui/stylesheet

Atomic CSS sheet management using @stitches/core under the hood. Used internally by the runtime. Not imported directly in application code.