Getting startedComponentsDesign tokensThemingTheme synthesizerFrameworksAccessibilityUtilitiesServer renderingBrowser supportContributingChangelogApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip
ARC UIARC Radiant Components
v4.9DocsComponentsTokensSynthesizer
Getting startedFrameworksServer renderingDesign tokensThemingTheme synthesizerTypographyUtilitiesAll componentsAccessibilityBrowser supportChangelogContributingStatsApp ShellAspect GridAuth ShellCenterContainerDashboard GridFloat BarInsetMasonryPage HeaderPage LayoutResizableResponsive SwitcherSectionSettings LayoutSplit PaneStatus BarStickyToolbarAnchor NavBottom NavBreadcrumbBreadcrumb MenuCommand BarDrawerFooterLinkMenubarNavigation MenuPage IndicatorPaginationRailScroll IndicatorScroll SpyScroll To TopSidebarSkip LinkStepper NavTabsTop BarTree ViewAccordionAspect RatioAvatarAvatar GroupCardCarouselCollapsibleColor SwatchCTA BannerDividerEmpty StateFeature CardIconImageImage CompareImage HotspotsInfinite ScrollLightboxMarqueeQR CodeScroll AreaSkeletonSpinnerStackVideoVirtual ListActivity HeatmapAnimated NumberBadgeBar ListChartClockComparisonCountdown TimerData GridDescription ListDiffGaugeJSON TreeKanbanLevel MeterListMeterSparklineStatStepperTagTimelineUptimeValue CardWaveformBlockquoteCode BlockCode GroupGradient TextHighlightKbdKeyboard MapMarkdownNumber FormatProseTerminalTextTime AgoTruncateTypewriterButtonButton GroupCalendarCheckboxChipColor PickerComboboxCopy ButtonDate PickerDate Range PickerField ListFieldsetFile UploadFormHotkeyIcon ButtonImage CropperInline EditInputInput GroupKnobLabelMasked InputMulti SelectNumber InputPassword InputPin InputRadio GroupRange SliderRatingSearchSegmented ControlSelectSignature PadSliderSortable ListSwitch GroupTag InputTextareaTheme ToggleTime PickerToggleTransfer ListTree SelectAlertAnnouncementBannerCommand PaletteConfirmConnection StatusContext MenuConversationDialogDropdown MenuHover CardLoading OverlayNotification PanelPopoverProgressSheetToastTooltip

Terminal

Animated terminal window that types commands and prints their output line by line.

ComponentsTerminal
typographyinteractive
<arc-terminal>

Overview

Terminal draws a window frame (three orbs, an optional centered `title` and a monospace body) and plays a transcript in it. Commands get an accent-colored prompt glyph and type one character at a time. Output lines appear whole after a short pause, and comment lines are muted. A blinking block cursor with an accent glow follows the typing and settles on a fresh prompt at the end, when `arc-complete` fires. `lines` is an array of `{ type, text, delay? }` objects, where `type` is `command`, `output` or `comment`. Set it from script, a framework binding or a JSON attribute. `speed` is milliseconds per typed character, as on Typewriter. The default pause before a line is 500ms for a command and 150ms for anything else, and a line's `delay` replaces it. The server renders the complete transcript, so the content never depends on JavaScript. On the client it's blanked before first paint and plays when the element scrolls into view, so a terminal halfway down a page types when the reader gets there. Set the `autoplay` property to `false` to start it yourself with `play()`, and set `loop` to replay it with a 2-second pause between cycles. Under `prefers-reduced-motion` nothing animates. The finished transcript shows at once, the cursor holds steady, and `arc-complete` still fires.

Guidelines

Do

  • Use it for install-and-run sequences on landing and getting-started pages
  • Put any command the reader needs in a CodeBlock as well. Terminal has no copy button or syntax highlighting
  • Use Typewriter for a single line of prose, such as a headline
  • Keep transcripts to five to eight lines. Thirty reads as a log file
  • Set a line's `delay` to stand in for real latency, such as a build step that runs for a beat before its output appears

Don't

  • Don't put critical instructions behind the animation. A reader scrolling fast shouldn't have to wait for the typing
  • Don't animate several terminals in the same viewport
  • Don't loop a long transcript. Clearing and replaying more than a few lines is distracting

Features

  • `reset()` blanks the transcript without starting playback, so you can replay it on demand

Preview

Usage

This component needs JavaScript. Use the Web Component or a framework wrapper.

<arc-terminal id="demo" title="arc — zsh"></arc-terminal>

<script type="module">
  import '@arclux/arc-ui';

  const demo = document.getElementById('demo');
  demo.lines = [
    { type: 'comment', text: '# Install ARC UI' },
    { type: 'command', text: 'pnpm add @arclux/arc-ui' },
    { type: 'output', text: '+ @arclux/arc-ui 3.0.0' },
    { type: 'command', text: 'pnpm dev' },
    { type: 'output', text: 'ready — http://localhost:5173/' },
  ];
  demo.addEventListener('arc-complete', () => console.log('done'));
</script>

API

promptstring'$'
Prompt glyph rendered before each command line.
titlestring''
Text centered in the window chrome bar. Empty hides it, leaving only the orbs.
speednumber50
Milliseconds per character when typing command lines.
linesArray[]
The transcript, as objects of shape { type: 'command' | 'output' | 'comment', text: string, delay?: number }. Commands get the prompt glyph and type character-by-character; output lines appear whole; comments render muted. delay is milliseconds before the line starts (default 500 for commands, 150 otherwise). Set it from script, a framework binding, or a JSON attribute.
autoplaybooleantrue
Start the animation when the element scrolls into view. Defaults to true; disable from JS or a framework wrapper with a false property value, then drive it with play().
loopbooleanfalse
Replay the transcript indefinitely, pausing briefly at the end of each cycle.

Methods

play()
Play the sequence from the beginning.
reset()
Return to the blank, pre-animation state without starting playback.

Events

arc-complete
Fired when the whole sequence has finished printing (each cycle, when looping)

See also