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

kaleido-ui

v0.1.131

Published

KaleidoSwap shared UI library — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit

Readme

kaleido-ui

Shared UI library for KaleidoSwap — design tokens, web components (Tailwind + Radix), and React Native components extending WDK UI Kit.

Installation

npm install kaleido-ui

Entry Points

| Import | Description | |--------|-------------| | kaleido-ui | Web components (Tailwind CSS + Radix UI) | | kaleido-ui/tokens | Platform-agnostic design tokens (zero deps) | | kaleido-ui/native | React Native components (WDK + custom) | | kaleido-ui/css | CSS variables (light + dark), keyframes, utilities, and the Tailwind v4 @theme tokens | | kaleido-ui/css/brand | Opt-in brand theme: AA-safe light primary, lifted dark danger/info, coloured page wash (import after kaleido-ui/css) | | kaleido-ui/tailwind | Tailwind v3 preset built from the tokens | | kaleido-ui/brand/*.svg | Logo files: kaleidoswap-pictogram.svg, kaleidoswap-fullogo-{horizontal,vertical}.svg (white wordmark) and -on-light.svg variants |

Tailwind v4 and v3 are both supported. The library is built with v4. On v4, kaleido-ui/css carries the whole theme as @theme blocks — no preset. On v3, which ignores @theme and only generates the opacity steps in its own scale, use the kaleido-ui/tailwind preset and import kaleido-ui/css for the variables it points at. Either way, scan the package's dist so the components' classes are generated. tests/tailwind-v3-preset.test.tsx compiles the components with both and fails if v3 misses a class v4 generates.

Quick Start — Web (Tailwind v4)

1. Import Tailwind + the kaleido-ui theme

/* styles.css */
@import "tailwindcss";
@import "tw-animate-css";   /* Dialog/Select/Toast enter-exit classes */
@import "kaleido-ui/css";

/* Tell Tailwind which files to scan for classes: yours and the components' */
@source "./src/**/*.{ts,tsx}";
@source "../node_modules/kaleido-ui/dist/web";

Tailwind v3

// tailwind.config.js
module.exports = {
  presets: [require('kaleido-ui/tailwind')],
  content: ['./src/**/*.{ts,tsx}', './node_modules/kaleido-ui/dist/web/*.js'],
  plugins: [require('tailwindcss-animate')],
}
/* index.css — kaleido-ui/css first: the preset's colours are its variables */
@import 'kaleido-ui/css';
@tailwind base;
@tailwind components;
@tailwind utilities;

The preset's colours are the theme's custom properties (opacity modifiers work through color-mix), so light and dark switch at runtime exactly as on v4.

// main.tsx
import './styles.css'

2. Use Components

import { Button, Card, CardContent, StatusBadge, AssetCard } from 'kaleido-ui'

function App() {
  return (
    <Card>
      <CardContent>
        <AssetCard
          ticker="BTC"
          name="Bitcoin"
          displayBalance="0.00142000"
          networks={['L1', 'LN', 'Spark']}
        />
        <StatusBadge status="completed" />
        <Button variant="cta" size="cta">Swap Now</Button>
      </CardContent>
    </Card>
  )
}

Quick Start — React Native

1. Install peer dependencies

npm install @tetherto/wdk-uikit-react-native react-native

2. Wrap with theme provider

import { KaleidoThemeProvider } from 'kaleido-ui/native'

export default function App() {
  return (
    <KaleidoThemeProvider>
      {/* Your app */}
    </KaleidoThemeProvider>
  )
}

3. Use Components

import {
  Balance,
  AmountInput,
  AssetSelector,
  StatusBadge,
  NetworkBadge,
} from 'kaleido-ui/native'

Quick Start — Tokens Only

Works in any JS runtime (Node.js, React Native, web) with zero dependencies.

import { colors, typeScale, radius, shadow } from 'kaleido-ui/tokens'

console.log(colors.primary)        // '#2BEE79'
console.log(colors.network.bitcoin) // '#F7931A'
console.log(typeScale.body)         // ['15px', '22px']

Web Components

Primitives

| Component | Description | |-----------|-------------| | Button | 11 variants (default, destructive, outline, secondary, ghost, link, glow, surface, cta, cta-gradient, danger-subtle), 9 sizes | | Card | Compositional: Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter | | Input | Form text input with focus ring | | Dialog | Modal dialog (Radix): Dialog, DialogContent, DialogHeader, DialogTitle, etc. | | Tabs | Tab navigation (Radix): Tabs, TabsList, TabsTrigger, TabsContent | | Label | Form label (Radix) | | Toast | Toast notifications (Radix): Toast, ToastProvider, Toaster | | Icon | Material Symbols wrapper with size variants (xs-2xl) | | Icons | Named icon shortcuts (Icons.Send, Icons.Receive, Icons.Swap, etc.) |

Shared Components

| Component | Description | |-----------|-------------| | StatusBadge | Status indicator (success, pending, failed, completed, error) | | NetworkBadge | Network/layer badge (L1, LN, RGB20, RGB21, Spark, Arkade) | | AssetIcon | Circular asset icon with CDN + fallback chain | | AssetCard | Asset display with icon, name, networks, balance | | TransactionCard | Transaction row with direction, status, amount | | PageHeader | Sticky header with left/center/right slots | | SettingItem | Settings row with icon, title, description, chevron | | SectionLabel | Uppercase section heading | | AlertBanner | Alert box (error, warning, info, success variants) | | ErrorBoundary | React error boundary with retry UI | | KaleidoswapLogo | Full logo, orientation="horizontal" \| "vertical". Wordmark uses currentColor; size with h-* w-auto | | KaleidoswapMark | The K pictogram on its own; size with size-* | | HaloBackdrop | Decorative drifting brand-colour blobs behind a screen (parent needs relative isolate) |

Hooks

| Hook | Description | |------|-------------| | useToast | Toast state management + toast() function | | useAssetIcon | Resolves asset ticker to CDN icon URL |

Utilities

| Export | Description | |--------|-------------| | cn() | clsx + tailwind-merge, configured with kaleido-ui's custom scales (text-title, text-icon-md, rounded-card, shadow-glow-*, tracking-eyebrow) so they are not mistaken for colours and dropped. Use it instead of a local twMerge. |

Brand utilities (from kaleido-ui/css)

Additive, per-theme (light by default, .dark switches):

| Utility | Use | |---------|-----| | text-brand, text-accent-send-fg, text-accent-recv-fg | Brand / send / receive foregrounds that clear WCAG AA in both themes | | text-{success,warning,danger,info}-fg | Status text (the plain text-warning etc. are dark-theme values) | | text-network-{bitcoin,lightning,liquid,arkade,spark,rgb,taproot}-fg | Network-hued text | | bg-page-brand | Coloured page wash (mint, violet, sky) | | text-gradient-brand | Brand gradient text, display sizes only |

Native Components

From WDK UI Kit (re-exported, themed)

AmountInput, AssetSelector, NetworkSelector, Balance, CryptoAddressInput, QRCode, TransactionItem, TransactionList, SeedPhrase

Custom

StatusBadge, NetworkBadge, AlertBanner, SectionLabel

Design Tokens

| Token | Values | |-------|--------| | colors | primary (#2BEE79), surfaces, text, semantic, network, transaction | | typeScale | xxs (10px) through display (36px) | | fontFamily | Geist Sans, Geist Mono | | fontWeight | normal (400) through bold (700) | | radius | sm (8px) through full (9999px) | | shadow | glow, glowStrong, glowSubtle, glowAccent | | transition | fast (150ms), default (200ms), slow (300ms) | | brandMark | The logo's three fills (violet, green, mint): paint, never text | | themedForeground | Per-theme AA foregrounds (brand, accent-*-fg, status and network -fg) | | brandDepth | Per-theme page wash, brand gradient and glows |

Development

npm install --legacy-peer-deps
npm run build    # Build all entry points
npm run dev      # Watch mode

License

MIT