Catalog npm
PACKAGE EXPLORERView in registry

8-bit-vibez

npm

8-bit pixel aesthetic Lit web component library

8-bitcustom-elementslitpico-8pixelretroweb-components
Versions collected2
Direct dependencies11From release 0.1.1
Last observed20 Oct, 21:15 UTC

README

Current package documentation

8-bit-vibez

npm version npm downloads license

A PICO-8 inspired Lit web component library with a subtle 8-bit aesthetic — hard corners, pixel-art shadows, stepped animations, and arcade UI primitives. Framework-agnostic custom elements that work in React, Vue, plain HTML, or any other stack.

Live Showcase · Storybook


Design Philosophy

The 8-bit character comes from geometry and motion, not from maxing out the decorative font everywhere:

  • border-radius: 0 — hard corners only
  • 2px 2px 0 color hard shadows — depth cue, not cartoon weight
  • steps(N) CSS transitions — frame-based state changes, not smooth eases
  • Pixel font (--font-pixel) reserved for short labels, scores, and headings — ≥16px
  • Body copy and interactive controls use JetBrains Mono (--font-body)
  • PICO-8 color palette, tuned to pass WCAG 2.1 AA contrast requirements

Components

Sprint 1 — Form Controls

ElementDescription
<pixel-button>primary / secondary / danger variants, sm/md/lg, loading, disabled
<pixel-input>Text input with scan-snap focus border, error message, label
<pixel-textarea>Multiline input with optional character counter
<pixel-checkbox>X-mark check, indeterminate support
<pixel-radio>Square-fill pixel radio button
<pixel-toggle>ON/OFF sliding block switch
<pixel-range>HP-bar style track — fill shifts green → yellow → red
<pixel-select>Custom listbox with keyboard navigation
<pixel-number>[<] / [>] step buttons around a numeric input

Sprint 2 — Feedback & Status

ElementDescription
<pixel-progress>Segmented HP bar, determinate + indeterminate scan animation
<pixel-life>♥ hearts or block segments, role="meter"
<pixel-score>Arcade digit counter with leading zeros, aria-live
<pixel-badge>Rarity tag — common / uncommon / rare / epic / legendary
<pixel-status>Blinking ● dot — online / idle / error / offline
<pixel-toast>Slide-in notification, auto-dismiss, 4 severity variants
<pixel-tooltip>Speech-bubble box with pixel arrow tail

Sprint 3 — Layout Primitives

ElementDescription
<pixel-card>Bordered container, optional title bar, accent color variants
<pixel-panel>Collapsible panel with ▶/▼ pixel-font indicator
<pixel-dialog>Modal with [X] close, role="dialog", focus trap, Escape key
<pixel-divider>Solid or dashed rule with optional centered label
<pixel-tabs>Full role="tablist" ARIA pattern, arrow key navigation

Sprint 4 — Arcade & RPG Specials

ElementDescription
<pixel-typewriter>Character-by-character text reveal with blinking block cursor
<pixel-dialog-box>RPG speech panel — speaker name, ▼ next indicator, multi-page messages
<pixel-sprite>CSS sprite sheet animation via steps() — bring your own PNG
<pixel-map>Canvas 2D tilemap renderer
<pixel-cursor>Blinking ▶ selection cursor for menus
<pixel-scanline>CSS-only CRT scanline + vignette overlay — opt-in, position: fixed

All form components are form-associated custom elements — they participate in native <form> submit and FormData without any wrapper.


Install

npm install 8-bit-vibez lit
<!-- Plain HTML / vanilla JS -->
<script type="module">
  import '8-bit-vibez'
</script>
<link rel="stylesheet" href="node_modules/8-bit-vibez/src/styles/tokens.css">
<pixel-button>PRESS START</pixel-button>
// Bundler (Vite, webpack, etc.)
import '8-bit-vibez'           // registers all 25 elements
import '8-bit-vibez/styles'   // CSS design tokens

// Named imports for tree-shaking
import { PixelButton, PixelDialogBox } from '8-bit-vibez'
// React 19 — custom elements work in JSX natively
import '8-bit-vibez'
import '8-bit-vibez/styles'

<pixel-button variant="primary">START GAME</pixel-button>

Running Locally

npm install
npm run dev         # showcase on localhost:5173
npm run storybook   # component docs on localhost:6007

Requires Node 18+.


Design Tokens

All visual properties are driven by CSS custom properties in src/styles/tokens.css. These pierce Shadow DOM natively — override them at :root to theme all components at once:

:root {
  /* Colors — PICO-8 palette */
  --bg:      #0d0d1a;
  --bg-2:    #1d2b53;
  --green:   #00e436;
  --blue:    #29adff;
  --yellow:  #ffec27;
  --red:     #ff004d;

  /* Typography */
  --font-pixel: 'Dogica', 'Press Start 2P', monospace;  /* decorative */
  --font-body:  'JetBrains Mono', 'Courier New', monospace;

  /* Shape — no border-radius in 8-bit art */
  --radius: 0px;

  /* Motion — stepped feel */
  --ease-step: steps(4);
}

Accessibility

  • WCAG 2.1 AA color contrast throughout (PICO-8 colors tuned for dark backgrounds)
  • prefers-reduced-motion: all CSS animations disabled; pixel-typewriter reveals full text instantly; pixel-sprite freezes on frame 0; pixel-scanline hides entirely
  • Full keyboard navigation on all interactive components
  • role="meter" on pixel-life, role="progressbar" on pixel-progress, role="tablist" on pixel-tabs, role="dialog" on pixel-dialog
  • aria-live="polite" on pixel-score and pixel-status
  • Disabled state uses filter: opacity(0.4) instead of opacity so WCAG 1.4.3 inactive-UI exemption is correctly recognized by accessibility tools

Known Gaps

  • pixel-typewriter prefers-reduced-motion fallback shows full text immediately ✓ but the aria-live region on inline usage may be verbose — wrap in a semantically appropriate container
  • pixel-map canvas content has role="img" with a label, but tile-level detail is not exposed to AT (by design — visual decoration)
  • pixel-scanline is purely decorative and aria-hidden — no AT impact

Roadmap

  • pixel-dialog — full inert attribute propagation to sibling elements
  • pixel-life / pixel-score — aria-live polite announcements on value change
  • Unit tests (@web/test-runner + @open-wc/testing)
  • Changelog (changeset)
  • pixel-audio — pixel-style audio player with frequency visualizer
  • pixel-inventory — grid-based item slot system
  • pixel-minimap — live canvas minimap

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 2

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.1Registry latest9 Sept 202611
0.1.09 Sept 202611

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
josegabrielcruz/8-bit-vibez

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 21:15 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7482837841b1948d462f4e8e94d6574f07bdb7d0a294f51cafd8c5e9822c02fd