GuideOptional

Code

Show inline code and monospace text.

Inline code

Wrap inline tokens in <code wrTypography variant="code">.

<p wrTypography>
  Inject the theme service with <code wrTypography variant="code">inject(WrTheme)</code>.
</p>

Inject the theme service with inject(WrTheme).

Force monospace

[mono] sets any variant in the monospace font.

<p wrTypography [mono]="true">
  Forces monospace on any variant — useful for ids, paths, version tags.
</p>

Forces monospace on any variant — useful for ids, paths, version tags.

Tones in code

A tone works on inline code too.

<code wrTypography variant="code" tone="primary">ROUTES.docs.installation.path</code>
<code wrTypography variant="code" tone="success">200 OK</code>
<code wrTypography variant="code" tone="danger">500 Server Error</code>
ROUTES.docs.installation.path200 OK500 Server Error

See also