Interactive Molecules
Composed components from @stackmates/ui-interactive/molecules
Dialog
Modal dialogs built on Radix UI Dialog primitive.
import {
Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger,
} from '@stackmates/ui-interactive/molecules';
<Dialog>
<DialogTrigger asChild><Button>Open</Button></DialogTrigger>
<DialogContent>
<DialogHeader><DialogTitle>Title</DialogTitle></DialogHeader>
</DialogContent>
</Dialog>MessageRow
One message with avatar. User right-aligned, assistant left-aligned.
I'll analyze your pipeline using the optimal-stopping algorithm.
Run the sales-rfp workflow for the Acme deal.
Starting the sales-rfp-workflow...
MessageRowData
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | — | Unique message identifier |
| role* | 'user' | 'assistant' | — | Message sender role |
| content* | string | — | Message text content |
| createdAt | string | — | ISO timestamp |
| agentName | string | — | Display name for assistant |
| isStreaming | boolean | — | Show streaming indicator |
MessageRowProps
| Prop | Type | Default | Description |
|---|---|---|---|
| message* | MessageRowData | — | Message data object |
| className | string | — | Additional CSS classes |
import { MessageRow } from '@stackmates/ui-interactive/molecules';
<MessageRow message={{ id: '1', role: 'assistant', content: 'Hello!', agentName: 'Bot' }} />
<MessageRow message={{ id: '2', role: 'user', content: 'Hi there' }} />MessageComposer
Textarea + send button. Enter sends, Shift+Enter for newline.
MessageComposerProps
| Prop | Type | Default | Description |
|---|---|---|---|
| value* | string | — | Current textarea value |
| onChange* | (value: string) => void | — | Value change handler |
| onSubmit* | () => void | — | Send handler |
| isLoading | boolean | false | Disable input while sending |
| placeholder | string | 'Type a message...' | Placeholder text |
import { MessageComposer } from '@stackmates/ui-interactive/molecules';
<MessageComposer
value={value}
onChange={setValue}
onSubmit={handleSend}
isLoading={false}
placeholder="Type a message..."
/>EntitySelector
Pick entity from list with avatar initials and badges.
EntityItem
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | — | Unique entity identifier |
| name* | string | — | Display name |
| description | string | — | Short description text |
| badges | string[] | — | Tag labels (max 2 shown) |
EntitySelectorProps
| Prop | Type | Default | Description |
|---|---|---|---|
| entities* | EntityItem[] | — | List of selectable entities |
| selectedId | string | — | Currently selected entity ID |
| onSelect* | (id: string) => void | — | Selection handler |
| className | string | — | Additional CSS classes |
import { EntitySelector } from '@stackmates/ui-interactive/molecules';
<EntitySelector
entities={[{ id: '1', name: 'Agent', description: 'Desc', badges: ['tag'] }]}
selectedId={selected}
onSelect={setSelected}
/>StageCard
Workflow stage with status badge, duration, and confidence.
StageCardData
| Prop | Type | Default | Description |
|---|---|---|---|
| id* | string | — | Unique stage identifier |
| name* | string | — | Stage name |
| status* | 'pending' | 'running' | 'completed' | 'failed' | 'skipped' | — | Current stage status |
| agent | string | — | Agent handling this stage |
| durationMs | number | — | Duration in milliseconds |
| confidence | number | — | Confidence score 0-1 |
StageCardProps
| Prop | Type | Default | Description |
|---|---|---|---|
| stage* | StageCardData | — | Stage data object |
| className | string | — | Additional CSS classes |
import { StageCard } from '@stackmates/ui-interactive/molecules';
<StageCard stage={{
id: '1', name: 'Research', status: 'completed',
agent: 'Architect', durationMs: 8500, confidence: 0.92
}} />More molecules: Toast, Popover, DropdownMenu, Tabs, etc.
See COMPONENT-INVENTORY.json for full list