Content Components

April 6, 2026 · View on GitHub

Content display including cards, headings, images, gradients, lists, and utility elements.

Content

Card

Content container with rounded border, optional title, icon, and variant coloring. Focused state brightens the border.

PropTypeDefaultDescription
childrenReactNode--Card content (required)
titlestring--Card title
iconstring--Icon before title
variant"default" | "storm" | "success" | "error" | "warning""default"Border color variant
focusedbooleanfalseBrighten border when focused
Plus container propsborderStyle, borderColor, padding*, width, margin*, backgroundColor

Basic: Simple card

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

<Card title="Server Status" variant="success">
  <Text>All systems operational</Text>
</Card>

Advanced: Dashboard cards

<Box flexDirection="row" gap={2}>
  <Card title="CPU" icon="*" variant="storm" focused={activePanel === "cpu"}>
    <Text bold>42%</Text>
    <Text dim>8 cores active</Text>
  </Card>
  <Card title="Memory" icon="*" variant={memUsage > 80 ? "warning" : "default"}>
    <Text bold>{memUsage}%</Text>
    <Text dim>12.4 / 16 GB</Text>
  </Card>
  <Card title="Disk" icon="*" variant={diskFull ? "error" : "default"}>
    <Text bold>87%</Text>
    <Text dim>438 / 500 GB</Text>
  </Card>
</Box>

Heading

Semantic heading with four visual hierarchy levels using weight, color, and decoration to differentiate in a monospace terminal where font sizes are fixed.

PropTypeDefaultDescription
childrenstring--Heading text (required)
level1 | 2 | 3 | 42Hierarchy level
colorstring | numberPer-level defaultOverride text color
boldbooleanPer-level defaultOverride bold
dimbooleanPer-level defaultOverride dim
Plus layout propswidth, margin*, minWidth, maxWidth

Level styles: H1 = BOLD UPPERCASE + brand color + underline decoration. H2 = Bold + primary text. H3 = Bold + secondary text. H4 = Dim + secondary text.

Basic: Page title

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

<Heading level={1}>Server Status</Heading>

Advanced: Section hierarchy

<Heading level={1}>System Overview</Heading>
<Heading level={2}>Active Services</Heading>
<Heading level={3}>Database cluster</Heading>
<Heading level={4}>Last checked 5 minutes ago</Heading>

Paragraph

Block of wrapped text with consistent bottom spacing for readable document-like layouts.

PropTypeDefaultDescription
childrenReactNode--Paragraph content (required)
marginBottomnumber1Bottom margin for spacing
colorstring | number--Text color
boldboolean--Bold weight
dimboolean--Dim rendering

Basic: Simple paragraph

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

<Paragraph>
  Storm is a high-performance terminal UI framework built on a custom React reconciler.
</Paragraph>

Advanced: Multi-paragraph document

<Paragraph bold color="#82AAFF">
  Welcome to the configuration wizard. This tool will guide you through initial setup.
</Paragraph>
<Paragraph>
  Each step validates your input before proceeding. Use Tab to move between fields
  and Enter to confirm selections.
</Paragraph>
<Paragraph dim marginBottom={2}>
  Press Ctrl+C at any time to cancel without saving.
</Paragraph>

Image

Multi-protocol inline image component. Supports Kitty Graphics, iTerm2, and a built-in Unicode block renderer with optional chafa-wasm acceleration.

PropTypeDefaultDescription
srcstring--Image file path
widthnumber--Display width in cells
heightnumber--Display height in rows
protocol"kitty" | "iterm2" | "sixel" | "block" | "auto""auto"Rendering protocol
altstring--Alt text
preserveAspectRatioboolean--Maintain aspect ratio
basePathstring--Base path for relative src
<Image src="./logo.png" width={40} height={20} protocol="auto" alt="Logo" />

Gradient

Text with color gradient. Interpolates between an array of hex colors across characters or lines.

PropTypeDefaultDescription
childrenstring--Text content
colorsstring[]--Array of hex color stops
direction"horizontal" | "vertical""horizontal"Gradient direction
<Gradient colors={["#D4A053", "#6DBF8B", "#82AAFF"]}>Storm Gradient Text</Gradient>

GradientBorder

Box with gradient-colored border characters transitioning from top-left to bottom-right.

PropTypeDefaultDescription
childrenReactNode--Box content
colors[string, string]["#7B5EFF", "#6DBF8B"]Gradient from/to colors
widthnumber | string40Box width
paddingnumber1Inner padding
<GradientBorder colors={["#FF6B6B", "#4ECDC4"]} width={50}>
  <Text>Fancy border</Text>
</GradientBorder>

GlowText

Text with glow effect. Three intensity levels with optional pulse animation.

PropTypeDefaultDescription
childrenstring--Text content
intensity"low" | "medium" | "high""medium"Glow intensity
colorstring | number"#7B5EFF"Glow color
animatebooleanfalsePulse animation
animateIntervalnumber400Pulse interval in ms
<GlowText intensity="high" color="#82AAFF">Storm TUI</GlowText>

Shadow

Drop shadow wrapper that adds visual depth with shadow characters on edges.

PropTypeDefaultDescription
childrenReactNode--Content to shadow
offsetnumber1Shadow thickness in characters
charstring"░"Shadow character
colorstring | number"#1A2030"Shadow color
direction"bottom-right" | "bottom" | "right""bottom-right"Shadow direction
widthnumber20Bottom shadow width
contentWidthnumber--Override width for bottom shadow to match content
<Shadow direction="bottom-right" offset={1}>
  <Box borderStyle="single" padding={1}><Text>Elevated card</Text></Box>
</Shadow>

RichLog

Scrollable log viewer with styled entries, level filtering, and text search with match highlighting.

PropTypeDefaultDescription
entriesreadonly LogEntry[]--Log entries ({ text, color?, dim?, bold?, timestamp?, level? })
maxVisiblenumber10Max visible rows
autoScrollbooleantrueAuto-scroll on new entries
showTimestampbooleanfalseShow timestamp column
timestampColorstring | numbercolors.text.dimTimestamp color
isFocusedbooleantrueEnable keyboard scrolling
filterLevel"debug" | "info" | "warn" | "error"--Minimum log level filter
searchQuerystring--Highlight and navigate matches (Ctrl+N/Ctrl+P)
renderEntry(entry, state) => ReactNode--Custom entry renderer

Compound API: RichLog.Root, RichLog.Entry.

<RichLog
  entries={[
    { text: "Server started", level: "info", timestamp: "12:00:01" },
    { text: "Connection failed", level: "error", timestamp: "12:00:05" },
  ]}
  showTimestamp
  filterLevel="info"
/>

Placeholder

Filler widget for prototyping layouts. Shows its dimensions with dim dots and optional label. Supports shimmer animation and multiple shapes.

PropTypeDefaultDescription
widthnumber20Width in characters
heightnumber3Height in rows
labelstring--Centered label text
colorstring | numbercolors.text.dimDot/text color
loadingbooleanfalseEnable shimmer animation
shape"rectangle" | "text" | "circle" | "card""rectangle"Placeholder shape
<Placeholder width={30} height={5} label="Sidebar" loading shape="card" />

UnorderedList

Bulleted list with per-level markers, custom icons, and status indicators.

PropTypeDefaultDescription
itemsListItem[]--Items (string, ReactNode, or { content, children?, icon?, status? })
markerstringlevel-basedCustom bullet marker
colorstring | numbercolors.text.primaryItem text color
markerColorstring | numbercolors.text.secondaryMarker color
iconstring--Global icon for all items
renderItem(item, index, marker) => ReactNode--Custom item renderer

Status values: "success" (green check), "error" (red x), "pending" (dim circle), "running" (spinner).

<UnorderedList
  items={[
    { content: "Install deps", status: "success" },
    { content: "Build project", status: "running" },
    { content: "Deploy", status: "pending" },
  ]}
/>

OrderedList

Numbered list with multiple numbering styles and nested item support.

PropTypeDefaultDescription
itemsListItem[]--List items (string, ReactNode, or { content, children })
startnumber1Starting number
colorstring | numbercolors.text.primaryItem text color
numberColorstring | numbercolors.text.secondaryNumber color
style"decimal" | "alpha" | "Alpha" | "roman" | "Roman""decimal"Numbering style
reversedbooleanfalseCount down instead of up
renderItem(item, index, numbering) => ReactNode--Custom item renderer
<OrderedList
  items={["First step", "Second step", "Third step"]}
  style="roman"
/>

DefinitionList

Term and definition pairs with stacked or inline layout.

PropTypeDefaultDescription
itemsDefinitionListItem[]--Array of { term, definition } (required)
termColorstring | numbercolors.brand.primaryTerm text color
layout"stacked" | "inline""stacked"Stacked (term above) or inline (same line with auto-aligned widths)
separator"line"--Show a dim horizontal line between items
renderTerm(term: string) => ReactNode--Custom term renderer
<DefinitionList
  items={[
    { term: "Name", definition: "Storm TUI" },
    { term: "Version", definition: "2.1.0" },
    { term: "License", definition: "MIT" },
  ]}
  layout="inline"
/>

Divider

Horizontal line that fills available width with configurable style.

PropTypeDefaultDescription
style"solid" | "dotted" | "dashed""solid"Line style
colorstringdivider colorLine color
widthnumber200Line width in characters
<Divider style="dashed" />

Timer

Live elapsed time or countdown display using useAnimation for periodic ticks.

PropTypeDefaultDescription
startTimenumber--Start timestamp (ms). Shows elapsed time.
durationnumber--Target duration (ms). With startTime, shows countdown.
valuestring--Manual value override (e.g. "01:23")
intervalnumber1000Update interval in ms
colorstring | numbercolors.text.primaryText color
runningbooleantrueWhether timer updates
prefixstring--Text before the time display
<Timer startTime={Date.now()} prefix="Elapsed: " />
<Timer startTime={Date.now()} duration={60000} color="yellow" />

Stopwatch

Count-up timer with configurable display format.

PropTypeDefaultDescription
runningbooleantrueWhether the stopwatch is running
onTick(elapsedMs: number) => void--Called each tick with elapsed time
format"mm:ss" | "hh:mm:ss" | "ss.ms""mm:ss"Display format
colorstring | numbercolors.text.primaryText color
<Stopwatch running={isRunning} format="hh:mm:ss" />

RevealTransition

Animates children appearing with fade or charge effect.

PropTypeDefaultDescription
childrenReactNode--Content to reveal
visibleboolean--Whether content is visible
type"fade" | "charge""fade"Animation type
durationMsnumberpersonality defaultAnimation duration
<RevealTransition visible={isReady} type="charge" durationMs={300}>
  <Text>Content loaded!</Text>
</RevealTransition>

Avatar

User avatar/initials display. Small renders (JD), large renders a 3-line bordered box.

PropTypeDefaultDescription
namestring--User name (initials extracted automatically)
size"small" | "large""small"Display size
colorstring | numberbrand primaryText/border color
renderInitials(initials, size) => ReactNode--Custom initials renderer
<Avatar name="Jane Doe" size="large" />

Digits

Large styled number and letter display using 3x5 block characters. Renders digits, colons, periods, dashes, spaces, and A-Z.

PropTypeDefaultDescription
valuestring--Characters to display (digits, letters, punctuation)
colorstring | number--Text color
boldboolean--Bold rendering
dimboolean--Dim rendering
<Digits value="12:34" color="#82AAFF" />

Kbd

Keyboard key display. Renders a key label in brackets with bold text, e.g. [Ctrl+C].

PropTypeDefaultDescription
childrenstring--Key label (e.g. "Ctrl+C")
colorstring | numbersecondaryText color
boldbooleantrueBold key label
dimboolean--Dim rendering
<Kbd>Ctrl+C</Kbd>

Terminal hyperlink using OSC 8 escape sequences. Clickable in supporting terminals.

PropTypeDefaultDescription
urlstring--Link URL
childrenReactNode--Link text
colorstring | numberpersonality link colorText color
boldboolean--Bold text
dimboolean--Dim text
<Link url="https://example.com">Visit Example</Link>

Newline

Renders empty lines for spacing.

PropTypeDefaultDescription
countnumber1Number of empty lines to render
<Text>First paragraph</Text>
<Newline count={2} />
<Text>Second paragraph</Text>

Tag

Colored label chip with filled or outlined variant and optional dismiss.

PropTypeDefaultDescription
labelstring--Tag text
variant"filled" | "outlined""filled"Visual variant
colorstring | numbercolors.brand.primaryTag color
onRemove() => void--Remove handler (shows dismiss indicator, fires on x/backspace)
isFocusedbooleanfalseEnable keyboard dismiss
renderLabel(label, variant) => ReactNode--Custom label renderer
<Box flexDirection="row" gap={1}>
  <Tag label="typescript" color="#3178C6" />
  <Tag label="removable" onRemove={() => remove()} isFocused variant="outlined" />
</Box>

Markdown

Renders a markdown string as styled terminal output with headings, bold, italic, code blocks, and lists.

PropTypeDefaultDescription
childrenstring--Markdown source text
widthnumber--Wrap width
<Markdown>{`# Title\nSome **bold** and *italic* text.`}</Markdown>

MarkdownViewer

Scrollable markdown viewer with syntax-highlighted code blocks. Wraps Markdown in a ScrollView.

PropTypeDefaultDescription
contentstring--Markdown source text
heightnumber--Viewport height
isFocusedbooleantrueAccept scroll input
<MarkdownViewer content={readmeText} height={20} />

Back to Components