Skip to content
IzzyBlazor 0.1.0-alpha.17

Enter all results ↑ ↓ move Esc close

Code

Inline code or a block, highlighted on the server.

IzzyBlazor.Code in the IzzyBlazor.Core package, generated from the 0.1.0-alpha.17 assembly and its doc comments.

Properties (11)

ChildContentRenderFragment?

The code. In a block, whitespace and line breaks are kept as written.

Blockbool = false

A block of code on its own lines (pre), scrolling sideways when long.

MaxHeightLength?

The tallest a block gets before its code scrolls, such as Length.Rem(20) for a long file. The language label and copy button stay in place. Blocks only.

Languagestring?

The language, such as "razor", "csharp", "css" or "bash": shown above a block, and used to color the code when the highlighter knows it (see Languages).

Highlightbool = true

Colors the code by Language. Defaults to true. The code must be plain text (or a string expression); content with markup in it is shown as written.

Titlestring?

A file name or caption for a block, such as "Program.cs", shown in a header row above the code in place of Language (which still sets the colors).

LineNumbersbool = false

Numbers a block's lines. The numbers aren't selected or copied with the code.

Lines of a block to highlight, by number from 1: single lines and ranges, such as "3-5,9". Highlighted lines are mark elements with a tinted background.

Copyablebool = true

Adds a copy button to a block (with JavaScript). Defaults to true.

CopyLabelstring? = "Copy code"

The copy button's name. Defaults to "Copy code".

CopiedLabelstring? = "Copied"

Announced after copying. Defaults to "Copied".

Events (0)

No events.

Types (1)

Length

struct

A width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.

Length members
MemberDescription
Sm

640px (matches the sm breakpoint).

Md

768px (matches the md breakpoint).

Lg

1024px (matches the lg breakpoint).

Xl

1280px (matches the xl breakpoint).

Prose

A comfortable reading width, 68 characters.

Full

100% of the containing block.

Auto

auto.

FitContent

fit-content: as wide as the content, up to the available space.

MinContent

min-content.

MaxContent

max-content.

Px(double value)

Pixels.

Rem(double value)

Root ems (16px each by default).

Percent(double value)

Percent of the containing block.

Ch(double value)

Character widths, for text measures.

Vw(double value)

Percent of the viewport width.

Dvh(double value)

Percent of the dynamic viewport height (accounts for mobile browser bars).

Of(string css)

Any CSS length, such as calc(100% - 2rem). Checked for unsafe characters.

Css string

The CSS value this length renders as.