Misc
Terminal
A prompt and a log, for a console inside an application, with a command history.
WAI-ARIA tested
Import
main.ts
import { Terminal } from '@vitral/vue';Basic
Welcome to Vitral. Type "help" to begin.
API
Read from packages/vue/src/components/Terminal/types.ts, so it says what the component actually accepts.
Props
| Name | Type | Description |
|---|---|---|
| welcomeMessage | string | Shown above the first command. |
| prompt | string | What each line starts with. Defaults to `'$'`. |
| inputLabel | string | Names the command line. Defaults to the locale's "Command". |
Plus pt, dt and unstyled from BaseProps, see pass-through and unstyled mode.
Emits
| Event | Payload | Description |
|---|---|---|
| command | event: TerminalCommandEvent | — |
Slots
| Name | Slot props | Description |
|---|---|---|
| welcome | — | Replaces the welcome message. |