Skip to Content
Sponsor

Code

Code is a component used to display inline code. It is composed from the Box component with a font family of mono for displaying code.

Import#

Usage#

Hello world
Editable Example

Colors#

You can change the color scheme of the component by passing the colorScheme prop.

console.log(welcome)var chakra = 'awesome!'npm install chakra
Editable Example

Props#

NameTypeDefaultDescription
colorSchemestringThe color scheme to use for the code.
childrenReact.ReactNodeThe content of the code
Edit this page