Pre element highlighting utilities for <pre> tags with dynamic theme support.
<pre> retains whitespace and line breaks. Pair with <code> for semantic code blocks: <pre><code>.pre-plain (no background), pre-muted (subtle border), pre-outline (solid border), pre-solid (filled).pre-*, pre-muted-*, pre-outline-*, pre-solid-* (e.g. pre-error).pre-solid-primary over separate pre-solid pre-primary smaller CSS output.Removes background, padding and border-radius. Uses current text color.
pre-plain no background
Subtle semi-transparent border with background.
pre-muted light border
Solid border matching the theme color.
pre-outline solid border
Solid filled background with white text.
pre-solid dark background
pre-primary
pre-secondary
pre-tertiary
pre-success
pre-error
pre-info
pre-warning
pre-caution
pre-highlight
pre-ink
pre-title
pre-description
pre-caption
pre-placeholder
Standalone compound variants equivalent to variant + color in one class.
pre-muted-primary
pre-muted-success
pre-muted-error
pre-outline-primary
pre-outline-success
pre-outline-error
pre-solid-primary
pre-solid-success
pre-solid-error
Multiple color formats are supported:
*-error, *-error-hover*-indigo-500*-[#ff0000]*-[red], *-[green]pre-indigo-500
pre-green-500
pre-red-500
pre-blue-200
pre-solid-indigo-500
pre-solid-green-500
pre-solid-[#ff0000]
pre-outline-indigo-500
pre-outline-[#ff6b6b]
pre-outline-[blue]
pre-muted-indigo-500
pre-muted-[#ff6b6b]
<pre> tag
function hello() {
console.log("Hello World");
}
<pre> + <code><code> (recommended)function hello() {
console.log("Hello World");
}
<pre> + <code><code> with theme colorfunction hello(name) {
return `Hello, ${name}!`;
}
console.log(hello("World"));
<pre> + <code><code> with error colorERROR: Failed to connect to database
at Database.connect (db.js:42)
at Server.start (server.js:18)
<pre> + <code><code> solid variant$ npm install beautify
$ npm run build
$ npm start
<pre> + <code><code> outline variant[2026-06-13 17:00:00] INFO Starting server...
[2026-06-13 17:00:01] INFO Server listening on port 3000
<pre> muted variant with colorWARNING: Deprecated configuration option
Please update your config file.
pre-plain removes background, padding, border-radiuspre-muted subtle border with backgroundpre-outline solid border matching theme colorpre-solid filled background with contrast textpre-* dynamic theme colors (default subtle variant)pre-muted-*, pre-outline-*, pre-solid-* shortcut variant + colorFor code inline utilities, see demo-code.html.