BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/motiq/approval-workflow

Approval Workflow

motiq/approval-workflow
FreeComponent

Display and control an app-owned approval process — sequential or parallel stages, required/optional reviewers, minimum approvals, current-user actions (approve / reject / request changes / comment / cancel / resubmit), decision history, and collapsing completed stages. The app owns authorization; the component surfaces app-provided disabled reasons. Status is icon + label; reduced-motion safe.

Live preview

live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.motiq.dev/r/approval-workflow.json

Source

registry/collaboration/approval-workflow.tsxwww.motiq.dev/r/approval-workflow.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import { motion, AnimatePresence, type Transition } from "motion/react";
5
6import { cn } from "@/lib/utils";
7import {
8 useReducedMotion,
9 getStatusMeta,
10 statusVars,
11 formatTimestamp,
12 useDisclosure,
13 streamItemVariants,
14 type StatusTone,
15} from "@/lib/motiq";
16
17/* --------------------------------------------------------------------------
18 * ApprovalWorkflow — presentation + control for an app-owned approval/sign-off
19 * process. The APPLICATION owns authorization: this component never decides
20 * whether an action is permitted — it renders the state it is given and asks
21 * the host (via `canAct`) whether each action is allowed, surfacing the host's
22 * disabled reason in the UI. Supports sequential (all-must-approve) and
23 * parallel (any-one / quorum) stages, minimum approvals, required vs optional
24 * approvers, a current-user action state, a decision history, and destructive
25 * reject confirmation. Clean-room original.
26 * ----------------------------------------------------------------------- */
27
28export type ApprovalStatus =
29 | "draft"
30 | "pending"
31 | "in_review"
32 | "approved"
33 | "rejected"
34 | "changes_requested"
35 | "cancelled"
36 | "expired";
37
38export type ApprovalAction =
39 | "approve"
40 | "reject"
41 | "request_changes"
42 | "add_comment"
43 | "cancel"
44 | "resubmit";
45
46/** How a stage aggregates its reviewers' decisions. */
47export type StageMode = "all" | "any" | "quorum";
48
49/** A reviewer's current decision on their stage. */
50export type ReviewerDecision =
51 | "pending"
52 | "approved"
53 | "rejected"
54 | "changes_requested";
55
56export interface Person {
57 /** Stable identity — drives keys, current-user matching, and avatar hue. */
58 id: string;
59 name: string;
60 /** Optional role/title, e.g. "Security lead". */
61 role?: string;
62 /** Optional avatar image; when absent an initials + hue avatar is generated. */
63 avatarUrl?: string;
64 /** Optional explicit avatar color (any CSS color). */
65 color?: string;
66}
67
68export interface Reviewer extends Person {
69 /** Optional approvers do not count toward `requiredApprovals`. */
70 optional?: boolean;
71 /** The reviewer's current decision on this stage. Defaults to "pending". */
72 decision?: ReviewerDecision;
73 /** When the decision was recorded. */
74 decidedAt?: Date | number | string;
75 /** A short note attached to the decision. */
76 note?: string;
77}
78
79export interface WorkflowStage {
80 /** Stable id — drives keys and the `currentStageId` pointer. */
81// … truncated

What it pulls in

npm packages

  • motion

Other registry items

  • https://motiq.dev/r/utils.json
  • https://motiq.dev/r/primitives.json

Files it writes

  • registry/collaboration/approval-workflow.tsx

Facts

Registry
motiq
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-12
Last confirmed
today

Go to the source

Docs on motiq www.motiq.dev RMahammad/motiq on GitHub Raw registry item This item as JSON

More from motiq

All 100 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Streamactivity-streammotiqComponentsFree1 dep
Adaptive Safe-Zone Gridadaptive-safe-zone-gridmotiqComponentsFreeno deps
Agent Run Timelineagent-run-timelinemotiqComponentsFree1 dep
AI Response Streamai-response-streammotiqComponentsFree1 dep
Animated Accordionanimated-accordionmotiqComponentsFree2 deps
Animated Buttonanimated-buttonmotiqComponentsFree1 dep
Animated Dialoganimated-dialogmotiqComponentsFree2 deps
Animated Gridanimated-gridmotiqComponentsFree2 deps
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex