Read-only command/code snippet block with a copy-to-clipboard button. Plain text
only — it doesn’t do syntax highlighting, and prompt is just a display hint
(no relation to any actual shell or language). The prompt character is hidden by
default; opt in with showPrompt.
< and-code value = " pnpm add @andersseen/web-components " show-prompt ></ and-code >
Properties Property Attribute Description Type Default copyablecopyableWhether to show the copy button. booleantruecustomClassclassAdditional CSS classes from the consumer. string''heightheightFixed height of the block (CSS length). string'auto'promptpromptPrompt character shown before each line (e.g. $, >, #). Ignored unless showPrompt is true. string'$'showPromptshow-promptWhether to show the prompt character before each line. Off by default — opt in per instance. booleanfalsevaluevalueCode or command to display. string''
Events Event Description Type andCodeCopyEmitted when the content is copied to the clipboard. CustomEvent<{ value: string; success: boolean; }>
Generated from packages/web-components/src/components/and-code/readme.md — keep this in sync with the
Stencil source, don't hand-edit the numbers.