Async workflows

Publish

PublishStateIcon

Shows content moving from draft to published.

States

4 total

Draft

The content is still a draft.

Draft

"draft"

The content is still a draft.

Publishing

"publishing"animated

Publication is in progress.

Published

"published"

The content is published.

Publishing failed

"error"

The content could not be published.

Implementation

Pass your current state.

The component stays presentational. Your application remains in control of async work and business logic. The state prop is a TypeScript string literal union — pass an invalid state and you'll get a type error at build time.

Source
Lucide
License
ISC
States
draft · publishing · published · error
example.tsx
import { PublishStateIcon } from "@stateglyph/react";
<PublishStateIcon state="draft" decorative />