UIstate

Path-based state management with wildcard subscriptions, async support, and state-driven CSS.

npm i @uistate/core
import { createEventState } from '@uistate/core';

const store = createEventState({ count: 0, user: { name: 'Alice' } });

store.subscribe('user.*', ({ path, value }) => {
  console.log(`${path} changed to`, value);
});

store.set('user.name', 'Bob'); // fires subscriber
store.get('user.name');        // 'Bob'

@uistate/core

Reactive store with path-based get/set/subscribe, wildcard listeners, async operations, and query client. ~6 KB, zero dependencies.

@uistate/css

State-driven CSS — write styles as state paths, compile to real CSS rules. Reactive design tokens, typed validation, WCAG contrast enforcement.

@uistate/event-test

Event-sequence testing for UIstate stores. Trigger state changes and assert values, types, and event firings in a chainable API.

@uistate/examples

Working examples: counters, dashboards, async patterns, data tables. Each example is a standalone HTML file.

Ecosystem

PackageVersionDescription
@uistate/core 5.5.2 Path-based state management
@uistate/react 1.0.0 React adapter hooks
@uistate/css 1.0.0 CSS-native state via custom properties
@uistate/event-test 1.0.0 Event-sequence testing
@uistate/examples 1.0.0 Example applications
@uistate/aliases 1.0.0 DOM aliases for vanilla JS

Why UIstate?

License

@uistate/core and @uistate/css are MIT licensed. @uistate/event-test has a proprietary license (free for personal/OSS use).