Skip to main content
CommandBlock displays each supplied command with a prompt marker. It does not execute commands or provide copying automatically. Pass a Button as button to supply an action.
The component accepts only commands and button. Additional native attributes are not forwarded.

Props

ReactElement<unknown, string | JSXElementConstructor<any>>
Optional action element beside the command lines, such as a copy button.
string[]
required
Command lines to display. The component prefixes each line with > and does not execute commands.