Design System

Interactive Molecules

ImportCC

Available via @stackmates/ui-interactive/molecules

Dialog

Modal dialogs built on Radix UI Dialog primitive.

DialogProps

PropTypeDefaultDescription
openbooleanControlled open state
onOpenChange(open: boolean) => voidCalled when open state changes
children*ReactNodeDialogTrigger + DialogContent

Installation

typescript
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogTrigger } from '@stackmates/ui-interactive/molecules';

Accessibility

  • Focus trapped inside dialog
  • Escape key closes
  • aria-labelledby linked to DialogTitle

Accordion

Expandable content sections. Supports single or multiple open items.

AccordionProps

PropTypeDefaultDescription
type*'single' | 'multiple'Allow one or many items open
collapsiblebooleanfalseAllow collapsing all items (single mode)

Installation

typescript
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@stackmates/ui-interactive/molecules';

Accessibility

  • Keyboard navigable with arrow keys
  • Space/Enter toggles
  • aria-expanded managed automatically

AlertDialog

Confirmation dialog for destructive actions requiring explicit consent.

AlertDialogProps

PropTypeDefaultDescription
openbooleanControlled open state
onOpenChange(open: boolean) => voidCalled when open state changes

Installation

typescript
import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@stackmates/ui-interactive/molecules';

Accessibility

  • role="alertdialog"
  • Cannot be dismissed by clicking outside
  • Focus returns to trigger on close
Related:

MessageRow

Single message with avatar. User right-aligned, assistant left-aligned.

OR
Orchestrator

I'll analyze your pipeline using the optimal-stopping algorithm.

Run the sales-rfp workflow for the Acme deal.

OR
Orchestrator

Starting the sales-rfp-workflow...

MessageRowProps

PropTypeDefaultDescription
message*MessageRowDataMessage data object with id, role, content, agentName, isStreaming
classNamestringAdditional CSS classes

Installation

typescript
import { MessageRow } from '@stackmates/ui-interactive/molecules';

Accessibility

  • Messages use semantic list structure
  • Role conveyed via alignment and labels

MessageComposer

Textarea + send button. Enter sends, Shift+Enter for newline.

MessageComposerProps

PropTypeDefaultDescription
value*stringCurrent textarea value
onChange*(value: string) => voidValue change handler
onSubmit*() => voidSend handler (also triggered by Enter key)
isLoadingbooleanfalseDisable input while sending
placeholderstring'Type a message...'Placeholder text

Installation

typescript
import { MessageComposer } from '@stackmates/ui-interactive/molecules';

Accessibility

  • Textarea auto-resizes
  • Enter submits
  • Shift+Enter for newline
  • Send button disabled when loading

EntitySelector

Pick entity from list with avatar initials, description, and badges.

EntitySelectorProps

PropTypeDefaultDescription
entities*EntityItem[]List of selectable entities (id, name, description, badges)
selectedIdstringCurrently selected entity ID
onSelect*(id: string) => voidSelection handler

Installation

typescript
import { EntitySelector } from '@stackmates/ui-interactive/molecules';
Accessibility notesContribute this section

StageCard

Workflow stage with status badge, agent name, duration, and confidence score.

Research & Discovery
Knowledge Architect
8.5s92%completed
Strategy Analysis
Navigator
running
Content Generation
Orchestrator
pending
Data Validation
Navigator
3.2sfailed

StageCardProps

PropTypeDefaultDescription
stage*StageCardDataStage data (id, name, status, agent, durationMs, confidence)
classNamestringAdditional CSS classes

Installation

typescript
import { StageCard } from '@stackmates/ui-interactive/molecules';
Accessibility notesContribute this section