Introducing PrimeReact v11-alpha 🎉Discover Now
styledMisc

Terminal

Terminal is a text-based interface component that emulates a command line experience, enabling users to enter commands and receive responses.

Welcome to PrimeReact Terminal. Type "help" for available commands.
$ 
preview

Usage#

import { Terminal } from '@primereact/ui/terminal';
<Terminal.Root>
    <Terminal.Welcome />
    <Terminal.CommandList />
</Terminal.Root>

Examples#

Basic#

An interactive terminal that accepts and responds to text commands.

Welcome to PrimeReact Terminal. Type "help" for available commands.
$ 
basic-demo

Template#

Use the render function to create a custom command display with full control over the output styling.

Type "help" for available commands
template-demo

File System#

An interactive file browser demonstrating navigation commands like ls, cd, cat, and pwd.

File System Browser - Type "help" for available commands.
~ $ 
filesystem-demo

AI Assistant#

A chat-style interface with typing indicators, demonstrating how Terminal can be styled for conversational experiences.

PrimeReact Assistant
Ask me anything about PrimeReact
> 
assistant-demo

API#

Sub-Components#

See Terminal Primitive for the full sub-component API.

Hooks#

See useTerminal for the headless hook API.

Accessibility#

See Terminal Primitive for WAI-ARIA compliance details and keyboard support.