JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 598
  • Score
    100M100P100Q102028F
  • License MIT

Framework-agnostic headless primitives for Tokis — state machines, accessibility helpers, and focus management. Zero dependencies.

Package Exports

  • @tokis/core

Readme

@tokis/core

Framework-agnostic headless primitives for the Tokis design system — state machines, accessibility helpers, and focus management. Zero dependencies.

Installation

npm install @tokis/core

Or install everything at once: npm install @tokis/tokis

Usage

import {
  createFocusTrap,
  rovingTabIndex,
  generateId,
  createMachine,
} from '@tokis/core';

What's Included

  • Focus ManagementcreateFocusTrap, rovingTabIndex, useFocusVisible
  • Accessibility — ARIA attribute helpers, unique ID generation
  • State Machines — Lightweight createMachine for component behavior
  • Controllable State — Unified controlled/uncontrolled state pattern

Why Use This?

@tokis/core contains no React, no DOM assumptions, and no CSS. Use it to build your own component library on top of Tokis' battle-tested accessibility and state management layer — in React, Vue, Svelte, or vanilla JS.

Documentation

Visit tokis.dev for the full documentation.

License

MIT