Display Atoms
Available via @stackmates/ui-interactive/atoms
Avatar
Compound component for user avatars with image and initials fallback. Built on Radix Avatar.
AvatarRx / AvatarRxImage / AvatarRxFallback
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Override size/shape via Tailwind classes (default: h-10 w-10 rounded-full) |
Installation
import { AvatarRx, AvatarRxImage, AvatarRxFallback } from '@stackmates/ui-interactive/atoms';Usage
With image and fallback
<AvatarRx>
<AvatarRxImage src="/avatar.png" alt="Jane Doe" />
<AvatarRxFallback>JD</AvatarRxFallback>
</AvatarRx>Accessibility
- AvatarRxImage requires alt text for screen readers
- AvatarRxFallback displays when image fails to load
- Built on Radix Avatar primitive with proper aria attributes
StatusBadge
Status indicator with icon and color mapping. 7 semantic variants for workflow states.
StatusBadgeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| status* | 'idle' | 'pending' | 'processing' | 'success' | 'warning' | 'error' | 'info' | — | Status variant that determines icon and color |
| pulse | boolean | false | Show animated pulse dot in top-right corner |
| showIcon | boolean | true | Show the status icon |
| size | 'sm' | 'md' | 'md' | Badge size variant |
Installation
import { StatusBadge } from '@stackmates/ui-interactive/atoms';Usage
Basic status
<StatusBadge status="success">Completed</StatusBadge>With pulse indicator
<StatusBadge status="processing" pulse>Running</StatusBadge>Accessibility
- Uses icon + text (not color alone) to convey status
- Processing status uses spinning icon for animation
- Pulse dot is decorative and supplementary
SimpleBadge
Minimal status indicator for data tables and lists. Semantic colors without icons or animations.
SimpleBadgeProps
| Prop | Type | Default | Description |
|---|---|---|---|
| variant* | 'success' | 'warning' | 'error' | 'info' | 'neutral' | — | Semantic color variant |
| children* | ReactNode | — | Badge content |
Installation
import { SimpleBadge } from '@stackmates/ui-interactive/atoms';Accessibility
- Text content provides meaning independent of color
- Uses ring-inset for visible boundary in all themes
Spinner
Animated SVG loading spinner with 3 size variants and sr-only "Loading" text.
SpinnerProps
| Prop | Type | Default | Description |
|---|---|---|---|
| size | 'sm' | 'md' | 'lg' | 'md' | Spinner diameter (sm=16px, md=24px, lg=32px) |
| className | string | — | Additional CSS classes |
Installation
import { Spinner } from '@stackmates/ui-interactive/atoms';Accessibility
- role="status" on the container for assistive technology
- Includes sr-only "Loading..." text
- Uses CSS animation (respects prefers-reduced-motion)
Skeleton
Animated pulse placeholder for loading states. Size and shape controlled entirely via className.
SkeletonProps
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | Width, height, and border-radius via Tailwind classes |
Installation
import { Skeleton } from '@stackmates/ui-interactive/atoms';
// Note: also re-exported via LoadingSkeletons moleculeAccessibility
- Decorative element — pair with aria-busy on the loading container
- Uses animate-pulse (respects prefers-reduced-motion via Tailwind)
SeparatorRx
Visual divider line built on Radix Separator. Supports horizontal and vertical orientation.
Content above
Content below
SeparatorProps
| Prop | Type | Default | Description |
|---|---|---|---|
| orientation | 'horizontal' | 'vertical' | 'horizontal' | Direction of the divider line |
| decorative | boolean | true | When true, hides from screen readers via aria-hidden |
Installation
import { SeparatorRx } from '@stackmates/ui-interactive/atoms';
// Exported as SeparatorRx to avoid naming conflictsAccessibility
- decorative=true hides from screen readers (default)
- Set decorative=false when separator conveys meaningful grouping
- Built on Radix Separator with proper role="separator"
EmptyStateIllustration
Professional SVG illustrations for empty data states. 6 domain-specific variants.
EmptyStateIllustrationProps
| Prop | Type | Default | Description |
|---|---|---|---|
| variant* | 'contacts' | 'deals' | 'activities' | 'notes' | 'tasks' | 'generic' | — | Illustration type matching the empty entity |
| className | string | — | Override size (default: h-32 w-32) |
Installation
import { EmptyStateIllustration } from '@stackmates/ui-interactive/atoms';Usage
In an empty table state
<div className="flex flex-col items-center py-12">
<EmptyStateIllustration variant="deals" />
<p className="mt-4 text-muted-foreground">No deals yet</p>
<Button className="mt-2">Create Deal</Button>
</div>Accessibility
- Illustrations are decorative — pair with descriptive text
- Uses data-testid for test targeting
ThemeToggle
Dropdown button to switch between light, dark, and system themes. Uses next-themes.
ThemeToggleProps
| Prop | Type | Default | Description |
|---|
Installation
import { ThemeToggle } from '@stackmates/ui-interactive/atoms';Accessibility
- Button has sr-only "Toggle theme" label
- Dropdown menu is keyboard navigable
- Prevents hydration mismatch with mounted check