CommandBlock displays each supplied command with a prompt marker. It does not execute commands or provide copying automatically. Supply actions with any React node, such as a Button, link or status. Command text uses pre and code semantics, preserves line breaks, and wraps within the available width. Prompt markers are decorative.
Usage
div. Use render to compose another root, for example render={<section aria-label="Installation commands" />}. CommandBlockProps is exported from twenty-ui/components/data-display.
When migrating, replace button with actions.
Props
ReactNode
Content beside the command lines, such as a copy button, link or status.
readonly string[]
required
Command lines to display. The component prefixes each line with > and does not execute commands.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, {}>
Allows you to replace the component’s HTML element
with a different tag, or compose it with another component.Accepts a
ReactElement or a function that returns the element to render.