Define states
Each icon definition maps named states to their glyph, accessible label, and optional animation flag.
Open-source · React · TypeScript · 31 icons
Early accessStateGlyph groups the related visual states of an interface action into one typed, accessible React component — so a button can move from idle → loading → success without scattered icon logic.
Get started
Install the React package and start using typed, accessible state icons in minutes. Tree-shaking ensures you only ship what you use.
npm install @stateglyph/reactHow it works
Each icon definition maps named states to their glyph, accessible label, and optional animation flag.
Import the component and pass a typed state prop — "idle", "loading", "success", or any state the icon supports.
Every state carries an ARIA label and role. Add decorative={false} and screen readers announce the current state.
import { UploadStateIcon } from "@stateglyph/react";
function UploadButton({ status }: { status: UploadState }) { return ( <button> <UploadStateIcon state={status} size={20} /> Upload file </button> );}Use it your way
Choose the integration that fits your project today. All three paths use the same state definitions and accessibility model.
Use ready-made, tree-shakeable components with typed state props in React, Next.js, or Vite.
Read setup→Generate an editable component inside your project when you want full control over its markup and styles.
Explore the CLI→Use framework-independent metadata and TypeScript definitions for custom tooling or other UI layers.
View the API→Collections
Icons are grouped by what the user is doing — uploading, playing media, navigating — so you find related states together.
Uploads, saves, payments, submissions, and other task lifecycles.
Explore collection →Temporary confirmation and saved preference states.
Explore collection →Roadmap
Coming soonThe first release focuses on a dependable set of state icons. The next phase makes the collection broader and gives you tools to create stateful icons from your own visual language.
Planned capabilities
Principles
Most icon libraries give you individual drawings. StateGlyph adds the missing relationship between them — so a button or status can move through its lifecycle without scattered imports and conditional rendering.
Related visual states live behind one stable component. No more switching between five separate icon imports.
StateGlyph renders state — it never owns your async logic, timers, or business rules. You stay in control.
Every state is a TypeScript literal. Every glyph ships with ARIA labels, roles, and reduced-motion support.
Every glyph keeps its source library and license metadata. Currently built on Lucide icons (ISC license).