Feedback Components

April 6, 2026 ยท View on GitHub

User feedback indicators, notifications, and status displays.

Feedback

Spinner

Animated loading indicator with 6 built-in styles. Uses imperative mutation and requestRender() for zero GC pressure animation.

PropTypeDefaultDescription
type"dots" | "line" | "arc" | "bounce" | "braille" | "storm""dots"Animation style
intervalnumber80Frame interval in milliseconds
labelstring--Text shown after spinner
labelColorstring | number--Label color
colorstring | numbercolors.brand.primarySpinner color
boldboolean--Bold spinner
dimboolean--Dim spinner

Basic: Loading spinner

import { Spinner } from "@orchetron/storm";

<Spinner type="dots" label="Loading..." color="#82AAFF" />

Advanced: Multiple spinner styles

<Box flexDirection="column" gap={1}>
  <Spinner type="storm" label="Analyzing codebase..." color="#82AAFF" />
  <Spinner type="braille" label="Building index..." color="#34D399" />
  <Spinner type="dots" label="Connecting..." labelColor="#808080" />
</Box>

ProgressBar

Horizontal progress bar with block fill characters, track color, optional percentage display, and label.

PropTypeDefaultDescription
valuenumber--Progress percentage 0-100 (required)
widthnumberDefault from themeBar width in columns
colorstring | numbercolors.brand.primaryFilled bar color
trackColorstring | numbercolors.text.dimEmpty track color
showPercentbooleanfalseShow percentage after bar
labelstring--Label shown before bar
Plus layout propsheight, margin*, minWidth, maxWidth

Basic: Simple progress

import { ProgressBar } from "@orchetron/storm";

<ProgressBar value={65} width={30} showPercent />

Advanced: Multiple progress bars with labels

<Box flexDirection="column" gap={1}>
  <ProgressBar value={100} width={25} color="#34D399" label="Download " showPercent />
  <ProgressBar value={72} width={25} color="#82AAFF" label="Install  " showPercent />
  <ProgressBar value={15} width={25} color="#FBBF24" label="Configure" showPercent />
</Box>

Badge

Colored status label rendered as [label]. Color is determined by variant or explicit color prop.

PropTypeDefaultDescription
labelstring--Badge text (required)
variant"default" | "success" | "warning" | "error" | "info""default"Color variant
colorstring | numberPer-variantOverride color
boldbooleanAuto (true for non-default)Bold text
dimboolean--Dim text

Basic: Status badges

import { Badge } from "@orchetron/storm";

<Badge label="OK" variant="success" />
<Badge label="FAIL" variant="error" />
<Badge label="v2.1" />

Advanced: Status row

<Box flexDirection="row" gap={2}>
  <Badge label="HEALTHY" variant="success" />
  <Badge label="3 warnings" variant="warning" />
  <Badge label="prod" color="#82AAFF" bold />
  <Badge label="us-east-1" dim />
</Box>

Toast

Temporary notification message with type-based icon and color. Supports auto-hide after a duration.

PropTypeDefaultDescription
messagestring--Notification text (required)
type"info" | "success" | "warning" | "error""info"Notification type (determines icon and color)
visiblebooleantrueWhether toast is shown
durationMsnumber3000Auto-hide after this many ms (0 = stay forever)
onDismiss() => void--Called when auto-hide timer fires
animatedbooleanfalseEnable slide-in entrance and dim-out exit animation
renderContent(message, type, icon) => ReactNode--Custom toast content renderer
Plus container propsborderStyle, borderColor, padding*, width, margin*

Basic: Success toast

import { Toast } from "@orchetron/storm";

<Toast message="File saved successfully" type="success" />

Advanced: Auto-hiding notification

<Box flexDirection="column">
  <Toast message="Connection lost. Retrying..." type="warning" durationMs={5000} />
  <Toast message="Build completed in 3.2s" type="success" visible={showBuildToast} durationMs={3000} />
</Box>

Compound API: Toast.Provider, Toast.Item.


ToastContainer

Manages a vertical stack of toasts with auto-dismiss. Displays up to maxVisible toasts, newest at the bottom.

PropTypeDefaultDescription
toastsToastItem[]--Stack of toast items to display (required)
position"top" | "bottom""bottom"Position of the toast stack
maxVisiblenumber3Maximum number of visible toasts
onDismiss(id: string) => void--Called when an individual toast auto-dismisses
Plus container propsborderStyle, borderColor, padding*, width, margin*

ToastItem type:

PropertyTypeDescription
idstringUnique toast identifier
messagestringToast message text
type"info" | "success" | "warning" | "error"Notification type
durationMsnumberAuto-hide duration in ms
<ToastContainer
  toasts={toasts}
  position="bottom"
  maxVisible={3}
  onDismiss={(id) => removeToast(id)}
/>

Alert

Bordered attention box with type-based border coloring and optional title. Suitable for persistent messages.

PropTypeDefaultDescription
childrenReactNode--Alert content (required)
type"success" | "warning" | "error" | "info""info"Alert type (determines border color)
titlestring--Bold title above content
Plus container propsborderStyle, borderColor, padding*, width, margin*, backgroundColor

Basic: Info alert

import { Alert, Text } from "@orchetron/storm";

<Alert type="info" title="Note">
  <Text>Configuration will take effect after restart.</Text>
</Alert>

Advanced: Error alert with details

<Alert type="error" title="Build Failed" borderStyle="round" padding={1}>
  <Text>TypeScript compilation failed with 3 errors:</Text>
  <Text color="#F87171">  src/index.ts:42 - TS2345: Argument type mismatch</Text>
  <Text color="#F87171">  src/utils.ts:18 - TS2304: Cannot find name 'foo'</Text>
  <Text color="#F87171">  src/utils.ts:25 - TS7006: Parameter implicitly has 'any' type</Text>
</Alert>

StatusMessage

Inline status message with type-appropriate icon and optional collapsible detail section.

PropTypeDefaultDescription
messagestring--Message text
type"success" | "warning" | "error" | "info""info"Status type (sets icon and color)
titlestring--Optional bold title before message
detailstring--Collapsible detail text (toggle with Enter)
isFocusedbooleanfalseEnable detail toggle
renderIcon(type, icon) => ReactNode--Custom icon renderer
<StatusMessage type="success" title="Build" message="Completed in 2.3s" />
<StatusMessage type="error" message="Connection refused" detail="ECONNREFUSED 127.0.0.1:5432" isFocused />

Tooltip

Overlay tooltip with configurable position, auto-flip, delay, and arrow indicator.

PropTypeDefaultDescription
contentstring--Tooltip text
childrenReactNode--Target element
visiblebooleanfalseWhether tooltip is shown
position"top" | "bottom" | "right" | "left""top"Tooltip position
colorstring | numbercolors.text.secondaryTooltip text color
maxWidthnumber--Max tooltip width (truncates with ellipsis)
delaynumber0Show delay in ms
arrowbooleanfalseShow arrow pointing to target
targetRownumber--Row position for auto-flip
targetColnumber--Column position for auto-flip
renderContent(content: string) => ReactNode--Custom content renderer
<Tooltip content="Press Enter to submit" visible={isFocused} position="bottom" arrow>
  <Button label="Submit" />
</Tooltip>

LoadingIndicator

Full-width loading bar with optional label and indeterminate animation mode.

PropTypeDefaultDescription
labelstring--Text shown beside the indicator
progressnumber--0-100 for determinate; omit for indeterminate
colorstring | numbercolors.brand.primaryIndicator color
<LoadingIndicator label="Fetching data..." />

Back to Components