Table of Contents
Code
Use Code to style and format inline fragments of computer code.
How to use it
Default
Use Code to style and format <code>
elements.
Veggies es bonus vobis
Color
You can also change background and text color.
Veggies es bonus
Veggies es bonus
Veggies es bonus
Size
Code comes in small, medium, and large. By default, size is inherited from the parent element.
Veggies es bonus
Veggies es bonus
Veggies es bonus
Configuration
- Name9.5.1•View source•View on npm
- Installnpm install @zendeskgarden/react-typography
- Depsnpm install react react-dom styled-components @zendeskgarden/react-theming
- Importimport { Code } from '@zendeskgarden/react-typography'
API
Code
Extends HTMLAttributes<HTMLElement>
Prop name | Type | Default | Description |
---|---|---|---|
hue | 'grey' | 'red' | 'green' | 'yellow' | 'grey' | Applies color to the background and the text |
size | 'small' | 'medium' | 'large' | 'inherit' | 'inherit' | Adjusts the font size. By default font size is inherited from the surrounding text. |