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

@blazefw/primitives

v0.1.1

Published

BlazeFW semantic UI type contracts — Stack, Text, Action, and Input primitives with design-token-based spacing and color for web, native, and email renderers

Downloads

185

Readme

@blazefw/primitives

TypeScript type contracts for the four BlazeFW semantic UI primitives — Stack, Text, Action, and Input. This package contains no runtime code, only types. Every BlazeFW renderer (@blazefw/web, @blazefw/native, @blazefw/email) depends on this package for shared prop definitions.

Installation

npm install @blazefw/primitives

What's inside

UI Primitive Props

StackProps — universal layout container

import type { StackProps } from '@blazefw/primitives';

const props: StackProps = {
  direction: 'row',        // 'row' | 'column' | 'row-reverse' | 'column-reverse'
  align: 'center',         // 'start' | 'center' | 'end' | 'stretch' | 'baseline'
  justify: 'between',      // 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly'
  gap: 4,                  // SpaceValue
  padding: 6,              // SpaceValue (also paddingX, paddingY, paddingTop, etc.)
  background: 'surface',   // ColorValue
  radius: 'md',            // 'none' | 'sm' | 'md' | 'lg' | 'full'
  wrap: true,              // boolean
  flex: 1,                 // number
};

TextProps — universal typography

import type { TextProps } from '@blazefw/primitives';

const props: TextProps = {
  variant: 'heading',   // 'body' | 'caption' | 'label' | 'heading' | 'title' | 'display' | 'code' | 'overline'
  as: 'h1',            // HTML tag override (web only)
  weight: 'bold',      // 'thin' | 'light' | 'normal' | 'medium' | 'semibold' | 'bold'
  color: 'primary',    // ColorValue
  align: 'center',     // 'left' | 'center' | 'right'
  maxLines: 2,         // number — clamps to N lines with ellipsis
  underline: true,
  strikethrough: false,
};

ActionProps — universal interactive element

import type { ActionProps } from '@blazefw/primitives';

const props: ActionProps = {
  variant: 'primary',     // 'primary' | 'secondary' | 'ghost' | 'danger' | 'link'
  size: 'md',             // 'xs' | 'sm' | 'md' | 'lg'
  onPress: () => {},      // () => void
  href: '/dashboard',     // string — renders as <a> on web
  external: false,        // opens in new tab (web only)
  disabled: false,
  loading: false,
  fullWidth: false,
};

InputProps — universal form field

import type { InputProps } from '@blazefw/primitives';

const props: InputProps = {
  type: 'email',                   // 'text' | 'email' | 'password' | 'number' | 'tel' | 'url' | 'search'
  variant: 'outline',              // 'outline' | 'filled' | 'underline'
  fieldLabel: 'Email address',
  placeholder: '[email protected]',
  hint: 'We will never share your email.',
  error: 'Invalid email format',
  leadingIcon: '✉',
  required: true,
  disabled: false,
  readOnly: false,
  multiline: false,
  rows: 4,
  onChange: (value: string) => {},
  onSubmit: (value: string) => {},
};

Design Token Types

SpaceValue — spacing scale (maps to 4px units)

import type { SpaceValue } from '@blazefw/primitives';

// Integer tokens: 0=0px, 1=4px, 2=8px, 3=12px, 4=16px, 6=24px, 8=32px, 12=48px, 16=64px
// String passthrough: '16px', '50%', '2rem'
const space: SpaceValue = 4;       // 16px
const custom: SpaceValue = '20px'; // passthrough

ColorToken — semantic color names

import type { ColorToken } from '@blazefw/primitives';

// Available tokens:
// 'background' | 'surface' | 'border'
// 'primary' | 'primary-fg'
// 'secondary' | 'secondary-fg'
// 'success' | 'warning' | 'danger'
// 'muted' | 'muted-fg'

ColorValue — token or raw hex/rgb string

import type { ColorValue } from '@blazefw/primitives';

const a: ColorValue = 'primary';    // resolved by renderer theme
const b: ColorValue = '#e11d48';    // raw color (passthrough)

Renderer Contract

import type { UltimateRenderer } from '@blazefw/primitives';

// Every render target must satisfy this contract:
interface UltimateRenderer<TNode> {
  Stack:  (props: StackProps)  => TNode;
  Text:   (props: TextProps)   => TNode;
  Action: (props: ActionProps) => TNode;
  Input:  (props: InputProps)  => TNode;
}

// Web  → TNode = ReactElement  (@blazefw/web)
// Native → TNode = ReactElement (@blazefw/native)
// Email  → TNode = string       (@blazefw/email)

Related packages

| Package | Purpose | |---|---| | @blazefw/web | Renders primitives as React components | | @blazefw/native | Renders primitives as React Native components | | @blazefw/email | Renders primitives as MSO-safe HTML strings |