HomeDocsComponentsBlocksChartsThemes
Introduction
  • Introduction
  • Installation
  • Themes
  • llms.txt
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Amount
  • Aspect Ratio
  • Audio Player
  • Avatar
  • Avatar Upload
  • Badge
  • Banner
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Code Block
  • Collapsible
  • Color Picker
  • Combobox
  • Command
  • Context Menu
  • Copy Button
  • Countdown
  • Data Grid
  • Data Table
  • Date Picker
  • Date Range Picker
  • Description List
  • Device Mockup
  • Dialog
  • Direction
  • Dot Loader
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • File Upload
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Label
  • Menubar
  • Meter
  • Multi Select
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Password Strength
  • Phone Input
  • Popover
  • Progress
  • Progress Circle
  • Radio Group
  • Rating
  • Resizable
  • Responsive Dialog
  • Rich Text Editor
  • Scroll Area
  • Segmented Control
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Signature
  • Skeleton
  • Slider
  • Sonner
  • Sortable
  • Spinner
  • Stat
  • Stepper
  • Switch
  • Table
  • Tabs
  • Tag Input
  • Terminal
  • Textarea
  • Time Field
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
  • Typography
  • Video Player
  • Window Mockup
AI
  • Message Scroller
  • Message
  • Bubble
  • Marker
  • Attachment
  • Questionnaire
  • Composer
  • Reasoning
  • Tool Call
  • Approval Card
  • Citations
Blocks
  • Airtable
  • Airtable Kanban
  • ClickUp List
  • ClickUp Kanban
  • Repeatable Group
  • Command Palette
  • Sign In and Sign Up
  • Availability Scheduler
  • AI Chat
  • Action Bar
  • Notion
  • Banking
  • Lineup Builder
  • Sports Score
  • Strava
  • Sheets
  • Notices
  • Settings
  • Billing
Utilities
  • motion
  • sounds
  • scroll-fade
  • shimmer
Another UI. Built on shadcn/ui with Phosphor icons.

Terminal

PreviousNext

A terminal window with a prompt, commands and coloured output. It can type each command and reveal the output, with a blinking cursor and a copy button per command.

Base UIReact AriaRadix UI
Radix UI
jacob@vwork: ~/projects/books
~/books $pnpm dlx shadcn@latest add @another-ui/terminalpnpm dlx shadcn@latest add @another-ui/terminal
✔ Checking registry.
✔ Installing dependencies.
✔ Created 1 file: - components/ui/terminal.tsx
~/books $pnpm devpnpm dev
â–² Next.js 16.4.0 - Local: http://localhost:3000
✓ Ready in 1.2s
~/books $git push origin maingit push origin main
error: failed to push some refs. Pull the remote changes first.
~/books $

Installation#

pnpm dlx shadcn@latest add https://anotherui.dev/r/terminal.json

Usage#

import { Terminal } from "@/components/ui/terminal"
<Terminal
  animate
  prompt="~ $"
  lines={[
    { command: "pnpm dev" },
    { output: "Ready in 1.2s", tone: "success" },
  ]}
/>

Lines#

Each line is a command or an output. A command takes a command string and an optional prompt. An output takes any content and a tone: default, muted, success, warning, error, info or accent. Line breaks in a string are kept.

Animation#

With animate, the terminal waits until it scrolls into view, types each command one character at a time, then reveals the output with a short rise and blur. A replay button sits in the title bar. Every line keeps its space from the start, so the page does not jump. When the body has a max height, it scrolls to follow the typing.

With reduced motion on, every line shows at once and the cursor stops blinking.

Props#

  • lines. The commands and output.
  • prompt and title. The default prompt and the window title.
  • variant. mac or windows chrome.
  • animate, typingSpeed and lineDelay. Typing on or off, milliseconds per character, and the pause after each line.
  • copyable. A copy button on each command. On by default.
  • showFinalPrompt. An empty prompt with a cursor at the end.
  • contentClassName. Classes for the body, like h-80.
Tag InputTextarea

On This Page

InstallationUsageLinesAnimationProps