Code

The Code component visually distinguishes inline text as a fragment of computer code.

Code

Usage

import { Code } from "@twilio-labs/match/components";
const Component = () => <Code>ahoy()</Code>;

Props

PropTypeDefaultDescription
variant?CodeVariant'dark''dark', 'light'

Guidelines

About Code

The Code component emphasizes short, inline pieces of computer code such as variable names, commands and function calls. For multiline code samples and bash shell prompts, see the Snippet component.


Examples

Dark

Light