Cookest
@cookest/ui Components

UI Component Library Overview

Cross-platform design system for Cookest — shared React and Flutter components built from a single source of truth.

UI Component Library Overview

The Cookest UI library provides a unified component set for both web (React) and mobile (Flutter), ensuring pixel-perfect visual parity across platforms. All components are built from shared design tokens defined once in JSON and generated into platform-specific formats via Style Dictionary.

Architecture

Packages

PackagePlatformInstallPath
@cookest/uiWeb (React)npm install @cookest/uiui-components/src/
cookest_uiMobile (Flutter)path dependencyui-components/flutter/
@cookest/ui-cliBothnpx @cookest/ui-cli add <component>ui-components/cli/

Components (18)

All 18 components are available in both React and Flutter with matching APIs:

ComponentReactFlutterDescription
Button<Button>CkButtonPrimary, secondary, ghost, danger variants with sizes and loading state
Input<Input>CkInputText fields with label, error, helper text, and icon support
Textarea<Textarea>CkTextareaMulti-line input with character count and auto-resize
Card<Card>CkCardContent container with header, body, footer sub-components
Badge<Badge>CkBadgeStatus indicators with dot and removable support
Avatar<Avatar>CkAvatarUser avatars with image, initials fallback, and group layout
Modal<Modal>CkModalDialog overlays with focus trap and animations
Tooltip<Tooltip>CkTooltipContextual hints with positioning
Toggle<Toggle>CkToggleSwitch controls with animated thumb
Select<Select>CkSelectDropdown selection with search support
Skeleton<Skeleton>CkSkeletonLoading placeholders for text, circular, and card layouts
Alert<Alert>CkAlertGlassmorphism banners — info, success, warning, error with size variants
Divider<Divider>CkDividerHorizontal/vertical separators with optional label
Slider<Slider>CkSliderRange input with marks, color variants, and value badge
Progress<Progress>CkProgressDeterminate/indeterminate bar with striped and animated modes
Spinner<Spinner>CkSpinnerAnimated loading ring with dual-arc design
Tabs<Tabs>CkTabsTab navigation — underline, pills, and boxed variants
Accordion<Accordion>CkAccordionAnimated expandable panels — default, bordered, separated

Design Principles

  1. Single source of truth — Tokens are defined once in JSON and generated for each platform
  2. Visual parity — Components look identical on web and mobile
  3. Accessibility first — ARIA attributes (React), semantic widgets (Flutter)
  4. Dark mode built-in — All components support light and dark themes
  5. Tree-shakeable — Import only what you need

Quick Start

React (npm)

npm install @cookest/ui
# or
bun add @cookest/ui
import { Button } from "@cookest/ui";
import "@cookest/ui/styles.css";

export default function App() {
  return <Button variant="primary">Get Started</Button>;
}

React (CLI — copy source into your project)

npx @cookest/ui-cli add button

Flutter

# pubspec.yaml
dependencies:
  cookest_ui:
    path: ../ui-components/flutter
import 'package:cookest_ui/cookest_ui.dart';

MaterialApp(
  theme: CookestTheme.light,
  darkTheme: CookestTheme.dark,
  home: Scaffold(
    body: CkButton(
      onPressed: () {},
      child: Text('Get Started'),
    ),
  ),
);

Flutter (CLI — copy widgets into your project)

npx @cookest/ui-cli add button --flutter

On this page