Interactive Atoms
From @stackmates/ui-interactive/atoms
Button
Primary action trigger with 6 visual variants and 3 sizes.
ButtonProps
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'secondary' | 'outline' | 'ghost' | 'destructive' | 'link' | 'default' | Visual style variant |
| size | 'default' | 'sm' | 'lg' | 'icon' | 'default' | Button size |
| asChild | boolean | false | Render as child element via Radix Slot |
| children* | ReactNode | — | Button content |
import { Button } from '@stackmates/ui-interactive/atoms';Usage
Basic
<Button variant="default">Click me</Button>Large secondary
<Button variant="secondary" size="lg">Large</Button>Accessibility
- Renders as <button> — keyboard accessible by default
- Use asChild to render as <a> for navigation links
Badge
Inline label with 7 color variants for tags and categories.
BadgeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| variant | 'default' | 'secondary' | 'outline' | 'destructive' | 'success' | 'warning' | 'danger' | 'default' | Visual style variant |
| children* | ReactNode | — | Badge content |
import { Badge } from '@stackmates/ui-interactive/atoms';Usage
Basic
<Badge>New</Badge>
<Badge variant="destructive">Error</Badge>RoleBadge
Stakeholder role badge for enterprise buying committees.
With influence:
RoleBadgeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| role* | StakeholderRole | — | Stakeholder role to display |
| influence | 'high' | 'medium' | 'low' | — | Influence level in buying decision |
| showIcon | boolean | true | Show role icon |
| showInfluence | boolean | false | Show influence indicator dot |
| size | 'sm' | 'md' | 'lg' | 'md' | Size variant |
import { RoleBadge, STAKEHOLDER_ROLES } from '@stackmates/ui-interactive/atoms';Usage
Basic
<RoleBadge role="champion" />With influence
<RoleBadge role="economic_buyer" influence="high" showInfluence />MessageBubble
Styled content bubble for messaging. Sender right-aligned, receiver left-aligned.
Hello! How can I help you?
Analyze our sales pipeline.
Analyzing...
MessageBubbleProps
| Prop | Type | Default | Description |
|---|---|---|---|
| content* | string | — | Message text |
| variant* | 'sender' | 'receiver' | — | Alignment and color style |
| isStreaming | boolean | false | Show cursor animation |
import { MessageBubble } from '@stackmates/ui-interactive/atoms';Usage
Receiver
<MessageBubble variant="receiver" content="Hello!" />Streaming
<MessageBubble variant="receiver" content="Typing..." isStreaming />TypingIndicator
Animated bouncing dots for loading/typing states.
TypingIndicatorProps
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Additional CSS classes |
import { TypingIndicator } from '@stackmates/ui-interactive/atoms';CostDisplay
Formatted cost and token usage display for AI operations.
CostDisplayProps
| Prop | Type | Default | Description |
|---|---|---|---|
| costUsd* | number | — | Cost in USD |
| tokens | { input: number; output: number } | — | Token usage counts |
import { CostDisplay } from '@stackmates/ui-interactive/atoms';