Code
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 = falseA 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 = trueColors 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 = falseNumbers a block's lines. The numbers aren't selected or copied with the code.
HighlightLinesstring?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 = trueAdds 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".
Item props (from LayoutItemBase)
Margin on all sides, in spacing steps (-16 to 16; one step = 4px).
Width.
Minimum width.
Maximum width.
Growbool = falseWhether to grow into free space inside a Stack, Row or Column: <Box Grow>.
Shrinkbool = trueWhether to shrink when space is short inside a Stack, Row or Column. Defaults to true; Shrink="false" keeps the size.
Starting size inside a Stack, before growing or shrinking.
Alignment across the parent's direction, overriding the parent's Align for this component only, such as a button lined up with the bottom of labeled fields in a Row.
Common props (from IzzyComponentBase)
Classstring?Extra CSS classes, merged after the component's own classes.
Stylestring?Inline style, appended after the component's generated custom properties.
VisibleFromBreakpoint?Shows the component only from this breakpoint up, such as header links for wide screens.
Events (0)
No events.
Types (1)
Length
structA width, height or flex basis: a size token, a keyword, or a CSS length built with a factory such as Rem.
| Member | Description |
|---|---|
Sm | 640px (matches the |
Md | 768px (matches the |
Lg | 1024px (matches the |
Xl | 1280px (matches the |
Prose | A comfortable reading width, 68 characters. |
Full | 100% of the containing block. |
Auto |
|
FitContent |
|
MinContent |
|
MaxContent |
|
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 |
Css string | The CSS value this length renders as. |