Design System

Feedback Molecules

ImportCC

Available via @stackmates/ui-interactive/molecules

Progress

Determinate progress bar built on Radix Progress. Value controls fill percentage via CSS transform.

Upload progress45%

Empty (0%)

ProgressProps

PropTypeDefaultDescription
valuenumberProgress percentage (0-100)
classNamestringOverride track height/color via Tailwind

Installation

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

Accessibility

  • Built on Radix Progress with role="progressbar" and aria-valuenow
  • Indicator uses CSS transform for smooth animation

Toast (useToast)

Imperative toast system with 5 semantic variants and convenience methods. Requires Toaster provider in the tree.

    Click a button to trigger a toast in the bottom-right corner.

    toast() options

    PropTypeDefaultDescription
    titleReactNodeBold heading text
    descriptionReactNodeBody text with detail
    variant'default' | 'destructive' | 'success' | 'warning' | 'info''default'Semantic color variant with icon
    actionToastActionElementAction button beside message

    Installation

    typescript
    import { toast, Toaster } from '@stackmates/ui-interactive/molecules';
    // Layout: <Toaster />  |  Handler: toast.success({ title: 'Saved' })

    Accessibility

    • Built on Radix Toast with role="status" and aria-live
    • Close button rendered for keyboard dismissal; swipe-to-dismiss on touch

    AlertNotice (SimpleAlert)

    Static alert banner with 5 variants. Compound: SimpleAlertTitle + SimpleAlertDescription for structured content.

    SimpleAlertProps

    PropTypeDefaultDescription
    variant'default' | 'info' | 'warning' | 'error' | 'success''default'Semantic color variant
    children*ReactNodeContent (use SimpleAlertTitle + SimpleAlertDescription)

    Installation

    typescript
    import { SimpleAlert, SimpleAlertTitle, SimpleAlertDescription } from '@stackmates/ui-interactive/molecules';

    Accessibility

    • Root has role="alert" for screen reader announcement
    • Title uses h5 for semantic heading structure

    ErrorCard

    Centered error card with icon, title, description, and a retry button that reloads the page.

    Error Loading Data

    Failed to load data

    Connection Lost

    Unable to reach the server. Check your network.

    ErrorCardProps

    PropTypeDefaultDescription
    titlestring'Error Loading Data'Error heading
    descriptionstring'Failed to load data'Error message

    Installation

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

    Accessibility

    • Uses destructive color tokens; retry is a focusable Button atom
    • Clear hierarchy: icon, title, description, action

    ErrorRetryButton

    Flexible error display with retry in three layouts: inline, card, and compact. Handles async retry with loading state.

    ErrorRetryButtonProps

    PropTypeDefaultDescription
    message*stringError message to display
    descriptionstringOptional detailed description
    variant'error' | 'warning' | 'info''error'Visual variant
    layout'inline' | 'card' | 'compact''inline'Layout style
    onRetry() => void | Promise<void>Retry callback. Reloads page if omitted.
    retryLabelstring'Retry'Retry button text

    Installation

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

    Accessibility

    • Semantic alert regions for screen readers
    • Loading spinner on retry button during async operations

    LoadingSkeletons

    Pre-composed skeleton patterns for 9 content types. Each variant mimics real content layout during loading.

    card

    list

    table

    profile

    metric

    LoadingSkeletonsProps

    PropTypeDefaultDescription
    variant'card' | 'list' | 'table' | 'form' | 'article' | 'profile' | 'metric' | 'dashboard' | 'timeline''card'Skeleton layout pattern
    countnumber1Number of skeleton instances
    classNamestringAdditional wrapper classes

    Installation

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

    Accessibility

    • Uses animate-pulse (respects prefers-reduced-motion)
    • Pair with aria-busy="true" on the loading container

    StreamingText

    Typewriter text display with animated cursor for AI-generated content. Fires onStreamComplete when streaming ends.

    Analyzing your pipeline data to identify the top deals likely to close this quarter...Content is being generated...

    StreamingTextProps

    PropTypeDefaultDescription
    content*stringText content to display
    isStreaming*booleanShows animated cursor when true
    showCursorbooleantrueShow cursor while streaming
    cursorCharstring'\u258B'Custom cursor character
    onStreamComplete() => voidCallback when streaming stops

    Installation

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

    Accessibility

    • aria-live="polite" announces new content; aria-busy during streaming
    • Cursor is aria-hidden; sr-only text says "Content is being generated..."

    AIInsightsPanel

    Panel displaying AI-generated insights with type icons, confidence scores, optional actions, and dismissal. Supports loading skeleton and "show more" overflow.

    AI Insights

    High-value deal at risk

    87%

    Deal #1042 has not had contact in 14 days. Similar deals that go cold have a 30% lower close rate.

    Related to: Enterprise SaaS License

    Follow up with Acme Corp

    72%

    Based on engagement patterns, scheduling a call this week could increase close probability by 15%.

    Pipeline concentration risk

    91%

    60% of your Q2 pipeline is in a single industry vertical.

    AIInsightsPanelProps

    PropTypeDefaultDescription
    insights*AIInsight[]Array of insights with id, type, title, description, confidence
    titlestring'AI Insights'Panel heading text
    dismissiblebooleanfalseShow dismiss button on each insight
    onDismiss(id: string) => voidCallback when an insight is dismissed
    maxVisiblenumber5Max insights shown before "show more" button
    isLoadingbooleanfalseShow loading skeleton state

    Installation

    typescript
    import { AIInsightsPanel } from '@stackmates/ui-interactive/molecules';
    import type { AIInsight } from '@stackmates/ui-interactive/molecules';

    Usage

    Dashboard insights panel

    tsx
    <AIInsightsPanel
      insights={insights}
      dismissible
      onDismiss={(id) => markDismissed(id)}
      maxVisible={3}
      isLoading={isLoading}
    />

    Accessibility

    • Each insight card has data-testid for test targeting
    • Dismiss button has aria-label "Dismiss insight"
    • Confidence score rendered via AIConfidenceScoreCompact atom

    StepsList

    Progress steps indicator with status icons (pending, active, complete, error). Suited for pipeline and workflow visualization.

    Data Pipeline

    Fetch source data

    2.4s

    Validate schema

    132 rows valid

    Transform records

    Processing batch 3 of 5...

    Load into warehouse

    Send notifications

    SMTP timeout after 30s

    StepsListProps

    PropTypeDefaultDescription
    steps*StepInfo[]Array of { label, status, message? } where status is pending | active | complete | error
    titlestring'Pipeline Steps'Heading text above the steps list

    Installation

    typescript
    import { StepsList } from '@stackmates/ui-interactive/molecules';
    import type { StepInfo } from '@stackmates/ui-interactive/molecules';

    Usage

    Basic pipeline steps

    tsx
    <StepsList
      title="Import Pipeline"
      steps={[
        { label: 'Upload file', status: 'complete' },
        { label: 'Validate', status: 'active', message: 'Checking...' },
        { label: 'Import', status: 'pending' },
      ]}
    />

    Accessibility

    • Uses distinct icons (check, spinner, X) alongside color to convey status
    • data-testid="steps-section" for test targeting
    • Returns null when steps array is empty

    AlertDialog

    Modal confirmation dialog built on Radix AlertDialog. Requires explicit user action to dismiss -- there is no close button or click-outside dismissal. Ideal for destructive or irreversible actions.

    AlertDialog (root)

    PropTypeDefaultDescription
    openbooleanControlled open state
    onOpenChange(open: boolean) => voidCallback when open state changes
    defaultOpenbooleanfalseInitial open state (uncontrolled)

    Installation

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

    Usage

    Delete confirmation

    tsx
    <AlertDialog>
      <AlertDialogTrigger asChild>
        <Button variant="destructive">Delete</Button>
      </AlertDialogTrigger>
      <AlertDialogContent>
        <AlertDialogHeader>
          <AlertDialogTitle>Confirm deletion</AlertDialogTitle>
          <AlertDialogDescription>This cannot be undone.</AlertDialogDescription>
        </AlertDialogHeader>
        <AlertDialogFooter>
          <AlertDialogCancel>Cancel</AlertDialogCancel>
          <AlertDialogAction onClick={handleDelete}>Delete</AlertDialogAction>
        </AlertDialogFooter>
      </AlertDialogContent>
    </AlertDialog>

    Accessibility

    • Built on Radix AlertDialog with role="alertdialog"
    • Focus trapped inside the dialog while open
    • No close-on-click-outside -- user must choose an action
    • Cancel and Action buttons use Button atom variants

    HoverCardRx

    Hover-triggered popover card built on Radix HoverCard. Displays rich content on pointer hover with animated enter/exit transitions. Best for previewing supplementary info without a click.

    HoverCardContent

    PropTypeDefaultDescription
    align'start' | 'center' | 'end''center'Alignment relative to trigger (on HoverCardContent)
    sideOffsetnumber4Distance in px from trigger (on HoverCardContent)
    openDelaynumber700Delay in ms before card opens on hover
    closeDelaynumber300Delay in ms before card closes on leave

    Installation

    typescript
    import { HoverCard, HoverCardTrigger, HoverCardContent } from '@stackmates/ui-interactive/molecules';

    Accessibility

    • Content accessible via pointer hover and focus (Radix Portal)
    • Not suitable for essential info (hover unavailable on touch)
    • Use Tooltip for brief labels; HoverCard for rich previews