Skip to main content

Code

Use the Code component to display snippets of code inline. If you want to display a block of code, use the CodeSnippet component instead.

Import

import { Code } from '@dynatrace/strato-components/typography';

Demo

Style inheritance

Code applies a monospace font family and specific font weight but otherwise inherits from its surrounding context. Any inheritable CSS property not explicitly set by the component flows through from the parent.

Still have questions?
Find answers in the Dynatrace Community