Skip to content

Function: Snippet()

ts
function Snippet(props: Readonly<{
  code: string;
  className?: string;
}> & RefAttributes<HTMLDivElement>): Block;

Defined in: src/renderer/blocks/index.ts:2201

Experimental

Snippet — small inline code chip with a copy button. For multi-line code prefer CodeBlock.

Parameters

ParameterType
propsReadonly<{ code: string; className?: string; }> & RefAttributes<HTMLDivElement>

Returns

Block

Example

ts
Snippet({code: 'npm install @matterway/sdk'});

Matterway Assistant SDK Documentation