npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

zeppos-zui

v1.0.1

Published

ZUI - A comprehensive UI component library for ZeppOS smart watches, optimized for Amazfit Balance (480x480)

Readme

@poke-flow/zui

A comprehensive UI component library for ZeppOS smart watches, optimized for Amazfit Balance (480x480 resolution).

npm version License: MIT

Features

  • 🎨 ZeppOS Design System - Follows official ZeppOS 3.0 design principles
  • 📱 Optimized for Circular Displays - Built for Amazfit Balance (480x480)
  • 🧩 Component Library - Buttons, Switches, Steppers, Lists, Toasts, and more
  • 🎬 Smooth Animations - Built-in easing functions and animation utilities
  • 📐 Flexible Layouts - Stack, Container, ScrollView, CircularLayout
  • 🎯 TypeScript - Full type safety and IntelliSense support
  • Tested - 180+ unit tests

Installation

npm install @poke-flow/zui
# or
yarn add @poke-flow/zui

Quick Start

import { Button, Switch, Toast } from '@poke-flow/zui';

// Create a primary button
const button = new Button({
  label: 'Click Me',
  variant: 'primary',
  x: 100,
  y: 200,
  onPress: () => console.log('Pressed!'),
});
button.mount();

// Create a toggle switch
const toggle = new Switch({
  value: false,
  onChange: (value) => console.log('Toggled:', value),
});
toggle.mount();

// Show a toast notification
Toast.show({
  message: 'Hello ZUI!',
  duration: 3000,
});

Components

Input Components

| Component | Description | |-----------|-------------| | Button | Interactive button with multiple variants (primary, secondary, destructive, ghost) | | Switch | Toggle switch with iOS-style design | | Stepper | Value stepper with increment/decrement buttons |

Display Components

| Component | Description | |-----------|-------------| | Text | Text display with typography presets and auto-scrolling |

Navigation Components

| Component | Description | |-----------|-------------| | TitleBar | Page title bar with optional back button | | ListItem | Settings/list row with label and accessories | | SectionHeader | Section header for grouping items |

Feedback Components

| Component | Description | |-----------|-------------| | Toast | Lightweight notification | | Loading | Loading indicator |

Layout Components

| Component | Description | |-----------|-------------| | Container | Basic container with padding and background | | Stack | Horizontal/vertical stack layout | | ScrollView | Scrollable content container | | CircularLayout | Layout optimized for circular screens |

Theme System

ZUI includes a comprehensive theme system based on ZeppOS design guidelines:

import { 
  systemColors, 
  textColors, 
  backgroundColors,
  fontSizes,
  spacingScale 
} from '@poke-flow/zui/theme';

// Colors
console.log(systemColors.blue);    // '#0986D4'
console.log(textColors.title);     // '#FFFFFF'
console.log(backgroundColors.primary); // '#000000' (OLED black)

// Typography (480x480)
console.log(fontSizes.body);       // { size: 32, lineHeight: 40 }

// Spacing
console.log(spacingScale.md);      // 16

Animations

Built-in animation utilities with easing functions:

import { animator, easeOut, easeInOut } from '@poke-flow/zui/animations';

// Animate a widget
animator.animate(widget, {
  property: 'x',
  from: 0,
  to: 100,
  duration: 300,
  easing: 'easeOut',
});

Usage in ZeppOS Project

After installing, import components in your ZeppOS pages:

// pages/settings/index.js
import { TitleBar, ListItem, Switch, Stepper } from '@poke-flow/zui';

Page({
  build() {
    // Create title bar
    const titleBar = new TitleBar({
      title: 'Settings',
      y: 50,
      screenWidth: 480,
    });
    titleBar.mount();

    // Create a list item with switch
    const vibrationSwitch = new Switch({ value: true });
    const listItem = new ListItem({
      label: 'Vibration',
      x: 50,
      y: 140,
      width: 380,
      accessory: 'custom',
      customAccessory: vibrationSwitch,
    });
    listItem.mount();
  },

  onDestroy() {
    // Cleanup
    titleBar.destroy();
    listItem.destroy();
  }
});

Design Principles

ZUI follows ZeppOS 3.0 design values:

  • Natural - Natural recognition and interaction
  • Simple - Simple interface, easy to understand
  • Symbiosis - Experience and value symbiosis

Visual Guidelines

  • Color System - Derived from nature, warm and diverse
  • Typography - Noto Sans font, minimum 24px for readability
  • Spacing - 4px grid system
  • Touch Targets - Minimum 48x48px for accessibility

API Reference

Full API documentation is available in the docs folder.

Contributing

Contributions are welcome! Please read our contributing guidelines.

License

MIT © PokeFlow