TermBlade Razor Components

Component Reference

Browse every built-in Razor component with terminal previews, Razor usage snippets, and parameter reference tables. All components inherit shared layout parameters from RenderableComponentBase.

Content Component

Text

Renders styled text with color and formatting options.

Preview

text-preview
 Normal text
 Bold text
 Italic text
 Underline text
 Strikethrough

Usage

<Text Content="Hello World!" Fg="#ffffff" Bg="#000000" />
<Text Content="Bold text" Fg="#ffff64" Attributes=@(TextAttributes.Bold) />
<Text Content="Wrapped text content" Fg="#aabbcc" Wrap="true" TextAlign="center" />

Demo Source (TextDemo.razor)

<Text Content="Normal text" Fg="#ffffff" Width="40" Height="1" />
<Text Content="Bold text" Fg="#ffff64" Attributes="@(TextAttributes.Bold)" Width="40" Height="1" />
<Text Content="Italic text" Fg="#64ff64" Attributes="@(TextAttributes.Italic)" Width="40" Height="1" />
<Text Content="Underline text" Fg="#ff6464" Attributes="@(TextAttributes.Underline)" Width="40" Height="1" />
<Text Content="Strikethrough" Fg="#c8c8c8" Attributes="@(TextAttributes.Strikethrough)" Width="40" Height="1" />

Parameters

NameTypeDefaultDescription
Contentstring""The text content to display.
Fgstring?nullForeground color as hex string (e.g. #ffffff).
Bgstring?nullBackground color as hex string.
TextAlignstring"left"Text alignment: left, center, or right.
WrapbooltrueWhether to wrap text at component boundary.
AttributesTextAttributesTextAttributes.NoneText formatting: Bold, Dim, Italic, Underline, Blink, Inverse, Strikethrough.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

SegmentedText

Renders terminal text from independently styled segments, including foreground colors, backgrounds, and text attributes.

Preview

segmentedtext-preview
 BUILD TermBlade.Core passed  502 tests
 WARN  preview height increased
 PATH  docs/components.html
 ERROR none

Usage

<SegmentedText Width="64" Height="5" BackgroundColor="#111827" Segments="@Segments" />

@code {
    private static readonly IReadOnlyList<SegmentedTextSegment> Segments = [...];
}

Demo Source (SegmentedTextDemo.razor)

<SegmentedText Width="64" Height="5" BackgroundColor="#111827" Segments="@Segments" />

@code {
    private static readonly IReadOnlyList<SegmentedTextSegment> Segments =
    [
        new("BUILD ", "#111827", "#a6e3a1", TextAttributes.Bold),
        new("TermBlade.Core ", "#cdd6f4"),
        new("passed", "#a6e3a1", Attributes: TextAttributes.Bold),
        new("  "),
        new("502 tests", "#89b4fa"),
        new("\n"),
        new("WARN ", "#111827", "#f9e2af", TextAttributes.Bold),
        new("preview height increased", "#f9e2af"),
        new("\n"),
        new("PATH ", "#111827", "#89b4fa", TextAttributes.Bold),
        new("docs/components.html", "#cdd6f4", Attributes: TextAttributes.Underline),
        new("\n"),
        new("ERROR ", "#111827", "#f38ba8", TextAttributes.Bold),
        new("none", "#a6e3a1", Attributes: TextAttributes.Bold)
    ];
}

Parameters

NameTypeDefaultDescription
SegmentsIReadOnlyList<SegmentedTextSegment>[]Ordered text segments with independent foreground, background, and attributes.
BackgroundColorstring"transparent"Optional background fill color for the whole component.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

Code

Displays syntax-highlighted source code with optional line numbers.

Preview

code-preview
  1 │ var host = Host.CreateDefaultBuilder(args)
  2 │     .UseTermBladeRazor<MyApp>()
  3 │     .Build();
  4 │
  5 │ await host.RunAsync();

Usage

<Code Width="100%" Height="18"
      Language="csharp"
      ShowLineNumbers="true"
      Content="@sourceCode" />

Demo Source (CodeDemo.razor)

<Code Width="100%" Height="100%" Language="csharp"
      ShowLineNumbers="true" Content="@CodeContent" />

@code {
    private const string CodeContent = @"var host = Host.CreateDefaultBuilder(args)
    .UseTermBladeRazor<MyApp>()
    .Build();

await host.RunAsync();";
}

Parameters

NameTypeDefaultDescription
Contentstring""The source code text to display.
Languagestring""Programming language for syntax highlighting (e.g. csharp, javascript).
ShowLineNumbersbooltrueWhether to show line numbers in the gutter.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

Markdown

Renders Markdown content with formatting for headings, lists, code blocks, and more.

Preview

markdown-preview
 # Markdown Demo

 • Bold, italic, inline code
 • Unicode: ✅ 🚀 ✨

 │ A blockquote example

   Console.WriteLine("Hello");

Usage

<Markdown Width="100%" FlexGrow="1"
          Content="@markdownText" />

Demo Source (MarkdownDemo.razor)

<Markdown Width="100%" Height="100%" Content="@MarkdownContent" />

@code {
    private const string MarkdownContent = @"# Markdown Demo

- **Bold**, *italic*, \`inline code\`
- Unicode: ✅ 🚀 ✨

> A blockquote example

\`\`\`csharp
Console.WriteLine(""Hello"");
\`\`\`";
}

Parameters

NameTypeDefaultDescription
Contentstring""The Markdown text to render.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

Diff

Shows a side-by-side or unified diff view comparing two text inputs.

Preview

diff-preview
  1 │   public string Greet(string name)
  2 │   {
  3 │ -     return $"Hello {name}";
  4 │ +     var message = $"Hello {name}!";
  5 │ +     return message;
  6 │   }

Usage

<Diff Width="100%" Height="18"
      OldText="@originalCode"
      NewText="@modifiedCode"
      ShowLineNumbers="true" />

Demo Source (DiffDemo.razor)

<Diff Width="100%" Height="100%"
      OldText="@OldText" NewText="@NewText"
      ShowLineNumbers="true" />

@code {
    private const string OldText = @"public string Greet(string name)
{
    return $""Hello {name}"";
}";
    private const string NewText = @"public string Greet(string name)
{
    var message = $""Hello {name}!"";
    return message;
}";
}

Parameters

NameTypeDefaultDescription
OldTextstring""The original text for comparison.
NewTextstring""The modified text for comparison.
ShowLineNumbersbooltrueWhether to display line numbers.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

AsciiFont

Renders large ASCII art text using various font styles.

Preview

asciifont-preview
 ████████╗██████╗ 
 ╚══██╔══╝██╔══██╗
    ██║   ██████╔╝
    ██║   ██╔══██╗
    ██║   ██████╔╝
    ╚═╝   ╚═════╝ 

Usage

<AsciiFont Width="42" Height="4"
           Text="NOVA"
           Font="block"
           Color="#c56aff"
           BackgroundColor="#1a1b26" />

Demo Source (AsciiFontDemo.razor)

<AsciiFont Width="60" Height="4"
           Text="Gallery"
           Font="block"
           Color="#c56aff" />

Parameters

NameTypeDefaultDescription
Textstring""The text to render as ASCII art.
Fontstring"normal"Font style: normal, block, etc.
Colorstring?nullText color as hex string.
BackgroundColorstring?nullBackground color as hex string.
SelectionBgstring"#4a5568"Selection background color.
SelectionFgstring"#ffffff"Selection foreground color.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

LineNumbers

Displays a column of line numbers, useful alongside code or text editors.

Preview

linenumbers-preview
  1 │
  2 │
  3 │
  4 │
  5 │

Usage

<LineNumbers Width="6" Height="16"
             LineCount="@lineCount"
             StartLine="1"
             Bg="#111827" />

Demo Source (LineNumbersDemo.razor)

<LineNumbers Width="6" Height="10"
             LineCount="10"
             StartLine="42"
             Fg="#8b949e"
             Bg="#161b22" />

Parameters

NameTypeDefaultDescription
LineCountint0Total number of lines to display.
StartLineint1Starting line number.
Fgstring?"#666666"Foreground color for line numbers.
Bgstring?nullBackground color.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

FrameBuffer

Provides a raw pixel-level drawing canvas for custom rendering.

Preview

framebuffer-preview
┌────────────────────────┐
│ ██  ▄▄  ░░  ▒▒  ▓▓   │
│ Custom pixel drawing   │
│ with direct buffer     │
│ access                 │
└────────────────────────┘

Usage

<FrameBuffer @ref="_frameBuffer"
             Width="100%" Height="100%"
             PixelWidth="120"
             PixelHeight="40" />

Demo Source (FrameBufferDemo.razor)

@using TermBlade.Core.Ansi
@using TermBlade.Core.Renderables

<FrameBuffer Width="100%" Height="100%"
             PixelWidth="120"
             PixelHeight="48"
             Draw="@DrawPreview" />

Parameters

NameTypeDefaultDescription
PixelWidthint120Width of the pixel buffer in characters.
PixelHeightint40Height of the pixel buffer in characters.
DrawAction<FrameBufferRenderable>?nullCustom draw callback invoked each render frame.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

Table

Displays tabular data with headers, borders, row separators, captions, and viewport offsets.

Preview

table-preview
╭ Release Matrix ─────────────────────╮
│ Package        │ Status  │ Coverage │
│────────────────┼─────────┼──────────│
│ TermBlade.Core │ Stable  │ 94%      │
│ Razor          │ Preview │ 88%      │
╰──────────── arrows scroll rows/cols ╯

Usage

<Table Headers="@Headers"
       Rows="@Rows"
       VisibleRowCount="10"
       MaxColumnWidth="24"
       Title=" Release Matrix " />

Demo Source (TableDemo.razor)

<Table Width="100%" Height="100%"
       Headers="@Headers"
       Rows="@Rows"
       VisibleRowCount="6"
       ShowRowSeparators="true" />

Parameters

NameTypeDefaultDescription
HeadersIReadOnlyList<string>[]Column header labels.
RowsIReadOnlyList<IReadOnlyList<string>>[]Cell values grouped by row.
RowOffset / ColumnOffsetint0Viewport offsets for scrolling rows and columns.
VisibleRowCountint20Maximum number of body rows rendered.
MinColumnWidth / MaxColumnWidthint6 / 32Column width bounds before truncation.
MaxVisibleWidthint120Maximum table layout width before horizontal clipping.
ShowHeadersbooltrueWhether to render the header row and separator.
ShowBorderbooltrueWhether the wrapping box draws a border.
ShowRowSeparatorsboolfalseWhether to draw a separator after each visible row.
Title / Captionstring?nullTop and bottom border labels.
TitleAlignment / CaptionAlignmentstring"left" / "right"Alignment of the top and bottom titles.
BorderStylestring"rounded"Border style (e.g. single, double, rounded).
BorderColor / HeaderColor / TextColor / BackgroundColorstring"#38bdf8" / "#facc15" / "#e5e7eb" / "#020617"Hex colors for borders, headers, text, and background.
HeaderAttributesTextAttributesTextAttributes.BoldText formatting attributes for the header row.

Content Component

Calendar

Renders a monthly calendar grid with configurable day colors and date highlighting.

Preview

calendar-preview
      June 2007
 Su Mo Tu We Th Fr Sa
                 1  2
  3  4  5  6  7  8  9
 10 11 12 13 14 15 16
 17 18 19 20 21 22 23
 24 25 26 27 28 29 30

Usage

<Calendar DisplayMonth="@new DateOnly(2025, 9, 1)"
          HighlightedDate="@DateOnly.FromDateTime(DateTime.Today)"
          DayNameColor="#00c000"
          HighlightColor="#cc0000"
          ShowOtherMonthDays="false"
          Width="20" Height="8" />

Demo Source (CalendarDemo.razor)

<Calendar Width="24" Height="10"
          DisplayMonth="@new DateOnly(2026, 6, 1)"
          HighlightedDate="@new DateOnly(2026, 6, 10)"
          HighlightColor="#1f6feb"
          DayNameColor="#58a6ff" />

Parameters

NameTypeDefaultDescription
DisplayMonthDateOnlyDateOnly.FromDateTime(DateTime.Today)Month to render.
HighlightedDateDateOnly?DateOnly.FromDateTime(DateTime.Today)Date to highlight using HighlightColor.
TitleColorstring"#ffffff"Color for month and year title text.
TitleAlignmentstring"center"Title alignment: left, center, or right.
DayNameColorstring"#00c000"Color for day name headers (Su to Sa).
DayColorstring"#ffffff"Color for days in the active month.
OtherMonthDayColorstring"#555555"Color for leading/trailing days when ShowOtherMonthDays is enabled.
HighlightColorstring"#ff0000"Color for the highlighted date.
BackgroundColorstring?nullBackground color for the calendar.
AlternateRowBackgroundColorstring?nullOptional background color for alternating week rows.
ShowOtherMonthDaysbooltrueWhether to render adjacent-month days in partial weeks.

Input Component

Input

A single-line text input with placeholder, cursor, and validation support.

Preview

input-preview
 Type something here...█

Usage

<Input Value="@Name"
       ValueChanged="@(v => Name = v)"
       Placeholder="Enter your name..."
       PlaceholderColor="#666666"
       CursorColor="#ffff00"
       Fg="#ffffff" Bg="#001122"
       Width="40" Height="1"
       MaxLength="50"
       OnEnter="@(_ => Submit())" />

Demo Source (InputDemo.razor)

<Input Value=""
       Placeholder="Type something here..."
       PlaceholderColor="#666666"
       CursorColor="#ffff00"
       Fg="#ffffff" Bg="#111827"
       Width="40" Height="1" />

Parameters

NameTypeDefaultDescription
Valuestring?nullCurrent text value of the input.
ValueChangedEventCallback<string>-Callback when value changes (two-way binding).
OnInputEventCallback<string>-Callback on each keystroke.
OnChangeEventCallback<string>-Callback when input loses focus with changed value.
OnEnterEventCallback<string>-Callback when Enter key is pressed.
Placeholderstring?nullPlaceholder text shown when empty.
PlaceholderColorstring?nullColor of placeholder text.
CursorColorstring?nullColor of the text cursor.
Fgstring?nullText foreground color.
Bgstring?nullText background color.
MaxLengthint?nullMaximum number of characters allowed.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

Textarea

A multi-line text editor with word wrapping and cursor navigation.

Preview

textarea-preview
┌────────────────────────────────┐
│ Line one of text               │
│ Line two continues here        │
│ Third line with more content   │
│█                               │
└────────────────────────────────┘

Usage

<Textarea Value="@content"
          ValueChanged="@OnChanged"
          WrapMode="word"
          Placeholder="Write something..."
          Fg="#e5e7eb" Bg="#111827"
          CursorColor="#f59e0b"
          Width="100%" Height="16"
          AutoFocus="true" />

Demo Source (TextareaDemo.razor)

<Textarea Value="Hello, TermBlade!"
          Placeholder="Type here..."
          Fg="#e5e7eb" Bg="#111827"
          CursorColor="#f59e0b"
          Width="40" Height="5" />

Parameters

NameTypeDefaultDescription
Valuestring""Current text content.
ValueChangedEventCallback<string>-Callback when value changes (two-way binding).
OnInputEventCallback<string>-Callback on each keystroke.
Placeholderstring?nullPlaceholder text when empty.
WrapModestring"word"Text wrapping mode: word or none.
Fgstring?nullText foreground color.
Bgstring?nullText background color.
ShowCursorbooltrueWhether to display the text cursor.
CursorColorstring?nullColor of the text cursor.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

Slider

A draggable slider control for numeric value selection.

Preview

slider-preview
 ────────────────────●──────────────────── 50%

Usage

<Slider Width="40" Height="1"
        Value="@volume"
        ValueChanged="@OnVolumeChanged"
        Min="0" Max="100" Step="5"
        ThumbColor="#facc15"
        AutoFocus="true" />

Demo Source (SliderDemo.razor)

<Slider Width="40" Height="1"
        Value="50"
        ThumbColor="#facc15" />

Parameters

NameTypeDefaultDescription
Minfloat0Minimum value.
Maxfloat100Maximum value.
Valuefloat50Current value.
ValueChangedEventCallback<float>-Callback when value changes (two-way binding).
OnValueChangedEventCallback<float>-Callback when value changes.
Stepfloat1Step increment for value changes.
Orientationstring"horizontal"Slider orientation: horizontal or vertical.
TrackColorstring?nullColor of the slider track.
ThumbColorstring?nullColor of the slider thumb.
ValueColorstring?nullColor of the value display.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

Select

A scrollable list for single item selection with keyboard navigation.

Preview

select-preview
 ▸ Option A   First option    ✓
   Option B   Second option
   Option C   Third option

Usage

<Select Width="40" Height="8"
        Options="@options"
        SelectedIndex="@selected"
        SelectedIndexChanged="@OnChanged"
        OnItemSelected="@OnPicked"
        AutoFocus="true" />

Demo Source (SelectDemo.razor)

@using TermBlade.Core.Renderables

<Select Width="40" Height="6"
        Options="@Options"
        SelectedIndex="@SelectedIndex"
        SelectedIndexChanged="@OnChanged"
        AutoFocus="false" />

@code {
    private List<SelectOption> Options { get; } =
    [
        new() { Name = "Option A", Description = "First option", Value = "a" },
        new() { Name = "Option B", Description = "Second option", Value = "b" },
        new() { Name = "Option C", Description = "Third option", Value = "c" },
    ];

    private int SelectedIndex { get; set; }

    private Task OnChanged(int index)
    {
        SelectedIndex = index;
        return Task.CompletedTask;
    }
}

Parameters

NameTypeDefaultDescription
OptionsList<SelectOption>[]List of selectable options.
SelectedIndexint0Index of the currently selected option.
SelectedIndexChangedEventCallback<int>-Callback when selection changes (two-way binding).
OnSelectionChangedEventCallback<int>-Callback when selection changes.
OnItemSelectedEventCallback<SelectOption>-Callback when an item is confirmed/selected.
ShowDescriptionbooltrueWhether to show option descriptions.
ShowScrollIndicatorbooltrueWhether to show scroll indicators.
SelectedBgstring?"#0055aa"Background color of the selected item.
Fgstring?nullText foreground color.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Chart Component

BarChart

Renders vertical, horizontal, or sparkline bar charts from numeric data.

Preview

barchart-preview
 BarChart
  █  █  █
  █  █  █  █
  █  █  █  █  █

Usage

<BarChart Width="100%" Height="8"
          Data="@Values"
          Labels="@Labels"
          BarColor="#58a6ff" />

Demo Source (BarChartDemo.razor)

<BarChart Width="100%" Height="8"
          Data="@SparkData"
          Sparkline="true"
          BarColor="#58a6ff" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<double>[]Numeric values to chart.
LabelsIReadOnlyList<string>?nullOptional labels for bars.
Orientationstring"vertical"Vertical or horizontal layout.
SparklineboolfalseCompact sparkline rendering mode.
BarColorstring?nullPrimary bar color.

Chart Component

LineChart

Renders numeric series as a terminal line chart with optional fill.

Preview

linechart-preview
 LineChart
  ▁▂▄▃▅▇▆█

Usage

<LineChart Width="100%" Height="12"
           Data="@ChartData"
           Title="Basic Line Chart"
           LineColor="#58a6ff" />

Demo Source (LineChartDemo.razor)

<LineChart Width="100%" Height="100%"
           Data="@ChartData"
           Title="Basic Line Chart"
           FillColor="#1f6feb" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<double>[]Series values.
Titlestring?nullOptional chart title.
LineColorstring?nullLine stroke color.
FillColorstring?nullOptional area fill color.

Chart Component

TimeSeriesLineChart

Renders timestamped values with formatted X-axis labels.

Preview

timeserieslinechart-preview
 TimeSeriesLineChart
  09:00     11:00     13:00

Usage

<TimeSeriesLineChart Width="100%" Height="12"
                     Data="@TimeData"
                     TimeFormat="HH:mm" />

Demo Source (TimeSeriesLineChartDemo.razor)

<TimeSeriesLineChart Width="100%" Height="100%"
                     Data="@TimeData"
                     Title="Server Response Time"
                     TimeFormat="HH:mm" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<TimeSeriesPoint>[]Timestamped series values.
TimeFormatstring"HH:mm"Date/time label format.
LineColorstring?nullLine stroke color.

Chart Component

HeatMap

Renders a matrix of values with configurable low, mid, and high colors.

Preview

heatmap-preview
 HeatMap
  Mon 02 01 05 08 07 03

Usage

<HeatMap Width="100%" Height="12"
         Data="@HeatData"
         RowLabels="@Rows"
         ColumnLabels="@Cols"
         ShowValues="true" />

Demo Source (HeatMapDemo.razor)

<HeatMap Width="100%" Height="100%"
         Data="@HeatData"
         LowColor="#0d1117"
         MidColor="#1f6feb"
         HighColor="#f0883e" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<IReadOnlyList<double>>[]Matrix values.
RowLabelsIReadOnlyList<string>?nullOptional row labels.
ColumnLabelsIReadOnlyList<string>?nullOptional column labels.
LowColor / MidColor / HighColorstring?nullColor gradient stops.

Chart Component

CandlestickChart

Renders OHLC financial data with bull and bear candle colors.

Preview

candlestickchart-preview
 CandlestickChart
  │ █ │ █ │ █ │ █

Usage

<CandlestickChart Width="100%" Height="12"
                  Data="@CandleData"
                  BullColor="#3fb950"
                  BearColor="#f85149" />

Demo Source (CandlestickChartDemo.razor)

<CandlestickChart Width="100%" Height="100%"
                  Data="@CandleData"
                  CandleWidth="3"
                  CandleGap="1" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<CandlestickPoint>[]OHLC data points.
BullColorstring?nullColor for rising candles.
BearColorstring?nullColor for falling candles.
CandleWidth / CandleGapint-Candle geometry controls.

Chart Component

PieChart

Renders proportional slices with labels and optional animation.

Preview

piechart-preview
 PieChart
  C# 35%  TS 25%  Python 20%

Usage

<PieChart Width="50%" Height="12"
          Data="@PieData"
          AnimationDuration="1.5" />

Demo Source (PieChartDemo.razor)

<PieChart Width="50%" Height="100%"
          Data="@PieData"
          AnimationDuration="1.5" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<PieSlice>[]Slice values, labels, and colors.
AnimationDurationdouble0Duration of sweep animation.

Chart Component

DoughnutChart

Renders a pie-style chart with a hollow center and optional center label.

Preview

doughnutchart-preview
 DoughnutChart
  center label: Tasks

Usage

<DoughnutChart Width="50%" Height="12"
               Data="@DonutData"
               CenterLabel="100%"
               InnerRadius="0.5" />

Demo Source (DoughnutChartDemo.razor)

<DoughnutChart Width="50%" Height="100%"
               Data="@DonutData"
               CenterLabel="100%"
               InnerRadius="0.5" />

Parameters

NameTypeDefaultDescription
DataIReadOnlyList<PieSlice>[]Slice values, labels, and colors.
InnerRadiusdouble0.5Hollow center radius ratio.
CenterLabelstring?nullText rendered in the center.
CenterLabelColorstring?nullCenter label color.

Input Component

TreeView

Displays hierarchical data with expand/collapse navigation, tri-state checkboxes, and filtering.

Preview

treeview-preview
├─▼ [x] src
│  ├─  [x] TermBlade.Core
│  └─  [ ] TermBlade.Razor
└─▶ [ ] samples

Usage

<TreeView Width="52" Height="12"
          Nodes="@nodes"
          CheckboxMode="true"
          Filter="@searchText"
          OnSelectionChanged="@OnSelected"
          OnNodeToggled="@OnToggled"
          OnNodeChecked="@OnChecked"
          OnNodeActivated="@OnActivated" />

Demo Source (TreeViewDemo.razor)

@using TermBlade.Core.Renderables

<TreeView Width="100%" Height="100%"
          Nodes="@Nodes"
          CheckboxMode="true"
          AutoFocus="false" />

Parameters

NameTypeDefaultDescription
NodesList<TreeNode>[]Top-level tree nodes to render.
CheckboxModeboolfalseEnables tri-state checkbox rendering and toggling with Space/mouse.
Filterstring?nullCase-insensitive filter text; matching descendants and ancestor paths stay visible.
AllowLetterBasedNavigationbooltrueTyped letters jump to next matching node label.
Fgstring?nullDefault foreground color for rows.
SelectedBgstring?"#0055aa"Background color for the selected row.
OnSelectionChangedEventCallback<TreeNode>-Raised when the selected node changes.
OnNodeToggledEventCallback<TreeNode>-Raised when a node expands or collapses.
OnNodeCheckedEventCallback<TreeNode>-Raised when checkbox state changes.
OnNodeActivatedEventCallback<TreeNode>-Raised when Enter activates a leaf node.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

TabSelect

A horizontal tab bar for switching between views or sections.

Preview

tabselect-preview
 ┌──────────┐┌──────────┐┌──────────┐
 │ Overview ││ Details  ││   Help   │
 └──────────┘└──────────┘└──────────┘

Usage

<TabSelect Width="50"
           Tabs="@tabNames"
           SelectedIndex="@activeTab"
           SelectedIndexChanged="@OnTabChanged"
           AutoFocus="true" />

Demo Source (TabSelectDemo.razor)

<TabSelect Width="50"
           Tabs="@Tabs"
           SelectedIndex="@SelectedIndex"
           SelectedIndexChanged="@OnTabChanged" />

@code {
    private List<string> Tabs { get; } = ["Overview", "Details", "Help"];
    private int SelectedIndex { get; set; }

    private Task OnTabChanged(int index)
    {
        SelectedIndex = index;
        return Task.CompletedTask;
    }
}

Parameters

NameTypeDefaultDescription
TabsList<string>[]List of tab labels.
SelectedIndexint0Index of the active tab.
SelectedIndexChangedEventCallback<int>-Callback when active tab changes (two-way binding).
OnTabChangedEventCallback<int>-Callback when active tab changes.
ActiveFgstring?nullForeground color of the active tab.
ActiveBgstring?nullBackground color of the active tab.
InactiveFgstring?nullForeground color of inactive tabs.
InactiveBgstring?nullBackground color of inactive tabs.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Container Component

Box

A flexible container with optional border, title, and layout properties. The fundamental building block for layouts.

Preview

box-preview
 ┌──────────────────────────────────────────────────────────┐
 │ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐│
 │ │ Top / Left     │ │                │ │                ││
 │ │                │ │ Center         │ │                ││
 │ │                │ │                │ │ Bottom / Right ││
 │ └────────────────┘ └────────────────┘ └────────────────┘│
 └──────────────────────────────────────────────────────────┘

Usage

<Box Width="100%" Height="100%"
     BackgroundColor="#000000"
     Border="true"
     BorderStyle="rounded"
     BorderColor="#ffc800"
     Title="My Panel"
     PaddingTop="1" PaddingLeft="2">
    <Text Content="Content goes here" Fg="#ffffff" />
</Box>

Demo Source (BoxDemo.razor)

<Box Width="100%" Height="100%" Border="true"
     BorderStyle="single" BorderColor="#444444">
    <Box Width="18" Height="5" Border="true"
         BorderColor="#58a6ff">
        <Text Content="Top / Left" Fg="#ffffff"
              LayoutPosition="absolute" Left="1" Top="1"
              Width="14" Height="1" />
    </Box>
    <Box Width="18" Height="5" Border="true"
         BorderColor="#58a6ff"
         LayoutPosition="absolute" Left="22" Top="0">
        <Text Content="Center" Fg="#ffffff"
              LayoutPosition="absolute" Left="1" Top="2"
              Width="14" Height="1" />
    </Box>
    <Box Width="18" Height="5" Border="true"
         BorderColor="#58a6ff"
         LayoutPosition="absolute" Left="44" Top="0">
        <Text Content="Bottom / Right" Fg="#ffffff"
              LayoutPosition="absolute" Left="1" Top="3"
              Width="14" Height="1" />
    </Box>
</Box>

Parameters

NameTypeDefaultDescription
BackgroundColorstring"transparent"Background color of the box.
BorderboolfalseWhether to draw a border.
BorderStylestring"single"Border style: single, double, rounded, bold, etc.
BorderColorstring"#ffffff"Border line color.
FocusedBorderColorstring?nullBorder color when focused.
ShouldFillbooltrueWhether to fill the box area with background color.
Titlestring?nullTitle text displayed in the top border.
TitleAlignmentstring"left"Title alignment: left, center, or right.
BottomTitlestring?nullTitle text displayed in the bottom border.
BottomTitleAlignmentstring"left"Bottom title alignment: left, center, or right.
ChildContentRenderFragment?nullChild components to render inside the box.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Container Component

ScrollBox

A scrollable container with configurable scrollbars for content overflow.

Preview

scrollbox-preview
 ┌────────────────────────▲│
 │  Scrollable content    ██
 │  that extends beyond   ██
 │  the visible area      ░░
 │  ...                   ░░
 └────────────────────────▼│

Usage

<ScrollBox Width="100%" FlexGrow="1"
           BackgroundColor="#16161e"
           Border="true"
           BorderColor="#7aa2f7"
           ContentWidth="180"
           ContentHeight="@totalHeight"
           ShowVerticalScrollbar="true"
           AutoFocus="true">
    @foreach (var item in items) {
        <Text Content="@item" Fg="#ffffff" />
    }
</ScrollBox>

Demo Source (ScrollBoxDemo.razor)

<ScrollBox Width="100%" Height="100%"
           ContentHeight="30"
           ShowVerticalScrollbar="true"
           Border="true"
           BorderColor="#7aa2f7"
           BackgroundColor="#16161e"
           TrackColor="#414868"
           ThumbColor="#7aa2f7"
           AutoFocus="false">
    <Text Width="60" Height="1" Content="Scrollable line 1" Fg="#7aa2f7" />
    <Text Width="60" Height="1" Content="Scrollable line 2" Fg="#9ece6a" />
    <Text Width="60" Height="1" Content="Scrollable line 3" Fg="#7aa2f7" />
    <!-- ... lines 4–20 ... -->
</ScrollBox>

Parameters

NameTypeDefaultDescription
ScrollXint0Horizontal scroll offset.
ScrollYint0Vertical scroll offset.
StickyScrollboolfalseWhether to auto-scroll to bottom when content changes.
ShowVerticalScrollbarbooltrueWhether to show the vertical scrollbar.
ShowHorizontalScrollbarboolfalseWhether to show the horizontal scrollbar.
BorderbooltrueWhether to draw a border.
BorderColorstring"#7aa2f7"Border line color.
BackgroundColorstring"#1a1b26"Background color.
TrackColorstring"#414868"Scrollbar track color.
ThumbColorstring"#7aa2f7"Scrollbar thumb color.
ContentWidthint0Total width of scrollable content.
ContentHeightint0Total height of scrollable content.
ChildContentRenderFragment?nullChild components to render inside the scroll area.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Container Component

ScrollBar

A standalone scrollbar indicator for custom scroll implementations.

Preview

scrollbar-preview
 ▲
 █
 █
 ░
 ░
 ░
 ▼

Usage

<ScrollBar Orientation="vertical"
           ScrollPosition="@pos"
          ScrollSize="100"
          ViewportSize="10"
          TrackColor="#333333"
          ThumbColor="#888888" />

Demo Source (ScrollBarDemo.razor)

<ScrollBar Width="1" Height="12"
           Orientation="vertical"
           ScrollPosition="35"
           ScrollSize="100"
           ViewportSize="20"
           ThumbColor="#58a6ff" />

Parameters

NameTypeDefaultDescription
Orientationstring"vertical"Scrollbar orientation: vertical or horizontal.
ScrollPositionint0Current scroll position.
ScrollSizeint100Total scrollable size.
ViewportSizeint10Visible viewport size.
TrackColorstring?"#333333"Track background color.
ThumbColorstring?"#888888"Thumb indicator color.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Container Component

ConsoleOverlay

An overlay panel for displaying log messages, errors, and warnings.

Preview

consoleoverlay-preview
 ┌─ Console ──────────────┐
 │ [INFO] App started     │
 │ [WARN] Low memory      │
 │ [ERR]  Timeout at 3s   │
 └────────────────────────┘

Usage

<ConsoleOverlay @ref="_overlay"
                Position="OverlayPosition.BottomRight"
                MaxLines="10"
                MaxWidth="60" />

@code {
    _overlay.Renderable.Log("App started");
    _overlay.Renderable.Warn("Low memory");
    _overlay.Renderable.Error("Connection timeout");
    _overlay.Renderable.Clear();
}

Demo Source (ConsoleOverlayDemo.razor)

@using TermBlade.Core.Console

<ConsoleOverlay Position="OverlayPosition.TopRight"
                MaxLines="4"
                MaxWidth="38"
                Lines="@Lines" />

Parameters

NameTypeDefaultDescription
PositionOverlayPositionOverlayPosition.BottomRightPosition of the overlay: TopLeft, TopRight, BottomLeft, BottomRight.
MaxLinesint10Maximum number of visible log lines.
MaxWidthint60Maximum width of the overlay in characters.
LinesIReadOnlyList<string>?nullPre-populated log lines.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

Confirm

A yes/no confirmation prompt with keyboard navigation.

Preview

confirm-preview
 Do you want to continue?
  Yes   No 

Usage

<Confirm Message="Do you want to continue?"
         Value="@confirmed"
         ValueChanged="@OnChanged"
         OnConfirmed="@OnConfirmed"
         Width="40" Height="2"
         AutoFocus="true" />

Demo Source (ConfirmDemo.razor)

<Confirm Message="Do you want to continue?"
         Value="true"
         Width="40" Height="2"
         AutoFocus="false" />

Parameters

NameTypeDefaultDescription
Messagestring"Are you sure?"The confirmation message to display.
ValueboolfalseCurrent selection (true = Yes, false = No).
ValueChangedEventCallback<bool>-Callback when the value toggles (two-way binding).
OnConfirmedEventCallback<bool>-Callback when the user presses Enter, Y, or N.
YesLabelstring"Yes"Label for the affirmative button.
NoLabelstring"No"Label for the negative button.
Fgstring?nullForeground color.
Bgstring?nullBackground color.
ActiveBgstring?"#0055aa"Background color of the active button.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Content Component

Spinner

An animated spinner indicator with customizable frames and title.

Preview

spinner-preview
 ⠹ Loading data...

Usage

<Spinner Title="Loading data..."
         SpinnerColor="#58a6ff"
         Fg="#c9d1d9"
         IsSpinning="true"
         Width="40" Height="1" />

Demo Source (SpinnerDemo.razor)

<Spinner Title="Loading data..."
         SpinnerColor="#58a6ff"
         Fg="#c9d1d9"
         Width="40" Height="1" />

Parameters

NameTypeDefaultDescription
Titlestring""Text displayed next to the spinner.
Framesstring[]?Braille dotsArray of spinner frame characters.
Intervaldouble0.08Seconds between frame advances.
Fgstring?nullForeground color for the title text.
Bgstring?nullBackground color.
SpinnerColorstring?nullColor of the spinner character.
IsSpinningbooltrueWhether the spinner is active.
CompletedTextstring?nullText shown when spinning stops. Defaults to ✔ + Title.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Input Component

MultiSelect

A selection list allowing multiple items to be toggled on or off.

Preview

multiselect-preview
 [x] Option A
 [ ] Option B
 [x] Option C
 [ ] Option D

Usage

@using TermBlade.Core.Renderables

<MultiSelect Width="40" Height="6"
             Options="@Options"
             OnSelectionChanged="@OnChanged"
             AutoFocus="true" />

Demo Source (MultiSelectDemo.razor)

@using TermBlade.Core.Renderables

<MultiSelect Width="40" Height="6"
             Options="@Options"
             AutoFocus="false" />

@code {
    private List<SelectOption> Options { get; } =
    [
        new() { Name = "Option A", Description = "First option", Value = "a" },
        new() { Name = "Option B", Description = "Second option", Value = "b" },
        new() { Name = "Option C", Description = "Third option", Value = "c" },
        new() { Name = "Option D", Description = "Fourth option", Value = "d" },
    ];
}

Parameters

NameTypeDefaultDescription
OptionsList<SelectOption>[]List of selectable options.
SelectedIndicesHashSet<int>[]Set of currently selected option indices.
SelectedIndicesChangedEventCallback<HashSet<int>>-Callback when selection changes (two-way binding).
OnSelectionChangedEventCallback<HashSet<int>>-Callback when selection changes.
OnConfirmedEventCallback<HashSet<int>>-Callback when the user presses Enter to confirm.
ShowDescriptionbooltrueWhether to show option descriptions.
ShowScrollIndicatorbooltrueWhether to show the scroll indicator.
CursorBgstring?"#333333"Background color of the cursor row.
SelectedBgstring?"#0055aa"Background color of selected rows.
Fgstring?nullForeground text color.
Common Layout Parameters
NameTypeDefaultDescription
Idstring?nullUnique identifier.
Widthstring?nullWidth (e.g. "100%", "40").
Heightstring?nullHeight.
FlexDirectionFlexDirection?nullFlex layout direction.
AlignItemsAlignItems?nullCross-axis alignment.
JustifyContentJustifyContent?nullMain-axis alignment.
FlexGrowfloat?nullFlex grow factor.
FlexShrinkfloat?nullFlex shrink factor.
LayoutPositionstring?nullPosition type.
Top / Left / Right / Bottomint?nullPosition offsets.
PaddingTop / PaddingRight / PaddingBottom / PaddingLeftint?nullPadding.
MarginTop / MarginRight / MarginBottom / MarginLeftint?nullMargin.
ZIndexint?nullStacking order.
Visiblebool?nullVisibility toggle.
Opacityfloat?nullOpacity (0.0 to 1.0).
Focusablebool?nullWhether the component can receive focus.
AutoFocusboolfalseWhether to auto-focus on mount.

Widgets Component

Markup

Renders Spectre-style markup content.

Preview

markup-preview
 Markup
 Renders Spectre-style markup content.
 Razor demo: MarkupDemo.razor

Usage

<Markup Width="40" Height="8" />

Demo Source (MarkupDemo.razor)

@using TermBlade.Core.Renderables

<Markup Content="[green]Status[/]: all systems online" Width="48" Height="3" />

API Documentation

Razor component: TermBlade.Razor.Components.Markup. Core renderable: TermBlade.Core.Renderables.MarkupRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Panel

Renders a bordered panel container.

Preview

panel-preview
 Panel
 Renders a bordered panel container.
 Razor demo: PanelDemo.razor

Usage

<Panel Width="40" Height="8" />

Demo Source (PanelDemo.razor)

@using TermBlade.Core.Renderables

<Panel Title="Panel" Width="42" Height="6" BorderColor="#7dcfff"><Text Content="Panel content" Width="30" Height="1" /></Panel>

API Documentation

Razor component: TermBlade.Razor.Components.Panel. Core renderable: TermBlade.Core.Renderables.PanelRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

TextPath

Renders a filesystem or URI path.

Preview

textpath-preview
 TextPath
 Renders a filesystem or URI path.
 Razor demo: TextPathDemo.razor

Usage

<TextPath Width="40" Height="8" />

Demo Source (TextPathDemo.razor)

@using TermBlade.Core.Renderables

<TextPath Path="src/TermBlade.Core/Renderables" Width="52" Height="1" Fg="#a6e3a1" />

API Documentation

Razor component: TermBlade.Razor.Components.TextPath. Core renderable: TermBlade.Core.Renderables.TextPathRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Tree

Renders a tree using the TermBlade tree view implementation.

Preview

tree-preview
 Tree
 Renders a tree using the TermBlade tree view implementation.
 Razor demo: TreeDemo.razor

Usage

<Tree Width="40" Height="8" />

Demo Source (TreeDemo.razor)

@using TermBlade.Core.Renderables

<Tree Root="@Root" Width="36" Height="6" />

@code {
    private static readonly TreeNode Root = new()
    {
        Label = "workspace",
        Children =
        [
            new() { Label = "src" },
            new() { Label = "tests" },
        ],
    };
}

API Documentation

Razor component: TermBlade.Razor.Components.Tree. Core renderable: TermBlade.Core.Renderables.TreeRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Columns

Arranges children horizontally in columns.

Preview

columns-preview
 Columns
 Arranges children horizontally in columns.
 Razor demo: ColumnsDemo.razor

Usage

<Columns Width="40" Height="8" />

Demo Source (ColumnsDemo.razor)

@using TermBlade.Core.Renderables

<Columns Width="48" Height="3"><Text Content="Left" Width="16" Height="1" /><Text Content="Center" Width="16" Height="1" /><Text Content="Right" Width="16" Height="1" /></Columns>

API Documentation

Razor component: TermBlade.Razor.Components.Columns. Core renderable: TermBlade.Core.Renderables.ColumnsRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Rule

Renders a horizontal rule.

Preview

rule-preview
 Rule
 Renders a horizontal rule.
 Razor demo: RuleDemo.razor

Usage

<Rule Width="40" Height="8" />

Demo Source (RuleDemo.razor)

@using TermBlade.Core.Renderables

<Rule Content="Section" Width="48" Height="1" RuleCharacter="-" />

API Documentation

Razor component: TermBlade.Razor.Components.Rule. Core renderable: TermBlade.Core.Renderables.RuleRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Grid

Arranges child content in a grid-like container.

Preview

grid-preview
 Grid
 Arranges child content in a grid-like container.
 Razor demo: GridDemo.razor

Usage

<Grid Width="40" Height="8" />

Demo Source (GridDemo.razor)

@using TermBlade.Core.Renderables

<Grid Width="48" Height="4"><Text Content="A1" Width="12" Height="1" /><Text Content="A2" Width="12" Height="1" /><Text Content="A3" Width="12" Height="1" /></Grid>

API Documentation

Razor component: TermBlade.Razor.Components.Grid. Core renderable: TermBlade.Core.Renderables.GridRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Rows

Arranges children vertically in rows.

Preview

rows-preview
 Rows
 Arranges children vertically in rows.
 Razor demo: RowsDemo.razor

Usage

<Rows Width="40" Height="8" />

Demo Source (RowsDemo.razor)

@using TermBlade.Core.Renderables

<Rows Width="36" Height="4"><Text Content="Row one" Width="30" Height="1" /><Text Content="Row two" Width="30" Height="1" /></Rows>

API Documentation

Razor component: TermBlade.Razor.Components.Rows. Core renderable: TermBlade.Core.Renderables.RowsRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Layout

Provides a layout region container.

Preview

layout-preview
 Layout
 Provides a layout region container.
 Razor demo: LayoutDemo.razor

Usage

<Layout Width="40" Height="8" />

Demo Source (LayoutDemo.razor)

@using TermBlade.Core.Renderables

<Layout Width="48" Height="5"><Text Content="Main layout region" Width="34" Height="1" /></Layout>

API Documentation

Razor component: TermBlade.Razor.Components.Layout. Core renderable: TermBlade.Core.Renderables.LayoutRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Padder

Adds padding around child content.

Preview

padder-preview
 Padder
 Adds padding around child content.
 Razor demo: PadderDemo.razor

Usage

<Padder Width="40" Height="8" />

Demo Source (PadderDemo.razor)

@using TermBlade.Core.Renderables

<Padder Width="40" Height="5"><Text Content="Padded content" Width="24" Height="1" /></Padder>

API Documentation

Razor component: TermBlade.Razor.Components.Padder. Core renderable: TermBlade.Core.Renderables.PadderRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Align

Aligns child content inside its bounds.

Preview

align-preview
 Align
 Aligns child content inside its bounds.
 Razor demo: AlignDemo.razor

Usage

<Align Width="40" Height="8" />

Demo Source (AlignDemo.razor)

@using TermBlade.Core.Renderables

<Align Width="40" Height="5"><Text Content="Centered" Width="16" Height="1" /></Align>

API Documentation

Razor component: TermBlade.Razor.Components.Align. Core renderable: TermBlade.Core.Renderables.AlignRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

FigletText

Renders figlet-style text.

Preview

figlettext-preview
 FigletText
 Renders figlet-style text.
 Razor demo: FigletTextDemo.razor

Usage

<FigletText Width="40" Height="8" />

Demo Source (FigletTextDemo.razor)

@using TermBlade.Core.Renderables

<FigletText Text="TB" Width="32" Height="3" Fg="#f9e2af" />

API Documentation

Razor component: TermBlade.Razor.Components.FigletText. Core renderable: TermBlade.Core.Renderables.FigletTextRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

BreakdownChart

Renders proportional category values as a breakdown chart.

Preview

breakdownchart-preview
 BreakdownChart
 Renders proportional category values as a breakdown chart.
 Razor demo: BreakdownChartDemo.razor

Usage

<BreakdownChart Width="40" Height="8" />

Demo Source (BreakdownChartDemo.razor)

@using TermBlade.Core.Renderables

<BreakdownChart Data="@Values" Labels="@Labels" Width="48" Height="6" />

@code {
    private static readonly List<double> Values = [42, 28, 18];
    private static readonly List<string> Labels = ["Core", "Razor", "Docs"];
}

API Documentation

Razor component: TermBlade.Razor.Components.BreakdownChart. Core renderable: TermBlade.Core.Renderables.BreakdownChartRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

JsonText

Renders formatted JSON text.

Preview

jsontext-preview
 JsonText
 Renders formatted JSON text.
 Razor demo: JsonTextDemo.razor

Usage

<JsonText Width="40" Height="8" />

Demo Source (JsonTextDemo.razor)

@using TermBlade.Core.Renderables

<JsonText Json="@Json" Width="48" Height="6" />

@code {
    private const string Json = """{""name"":""TermBlade"",""kind"":""TUI""}""";
}

API Documentation

Razor component: TermBlade.Razor.Components.JsonText. Core renderable: TermBlade.Core.Renderables.JsonTextRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

Canvas

Renders a terminal drawing canvas.

Preview

canvas-preview
 Canvas
 Renders a terminal drawing canvas.
 Razor demo: CanvasDemo.razor

Usage

<Canvas Width="40" Height="8" />

Demo Source (CanvasDemo.razor)

@using TermBlade.Core.Renderables

<Canvas Width="32" Height="6" />

API Documentation

Razor component: TermBlade.Razor.Components.Canvas. Core renderable: TermBlade.Core.Renderables.CanvasRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Widgets Component

CanvasImage

Renders image-like content on a terminal canvas.

Preview

canvasimage-preview
 CanvasImage
 Renders image-like content on a terminal canvas.
 Razor demo: CanvasImageDemo.razor

Usage

<CanvasImage Width="40" Height="8" />

Demo Source (CanvasImageDemo.razor)

@using TermBlade.Core.Renderables

<CanvasImage Width="32" Height="6" />

API Documentation

Razor component: TermBlade.Razor.Components.CanvasImage. Core renderable: TermBlade.Core.Renderables.CanvasImageRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Notification

Renders a notification message.

Preview

notification-preview
 Notification
 Renders a notification message.
 Razor demo: NotificationDemo.razor

Usage

<Notification Width="40" Height="8" />

Demo Source (NotificationDemo.razor)

@using TermBlade.Core.Renderables

<Notification Content="Build completed" Width="36" Height="1" Fg="#a6e3a1" />

API Documentation

Razor component: TermBlade.Razor.Components.Notification. Core renderable: TermBlade.Core.Renderables.NotificationRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Button

Renders a focusable button.

Preview

button-preview
 Button
 Renders a focusable button.
 Razor demo: ButtonDemo.razor

Usage

<Button Width="40" Height="8" />

Demo Source (ButtonDemo.razor)

@using TermBlade.Core.Renderables

<Button Content="Deploy" Width="18" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.Button. Core renderable: TermBlade.Core.Renderables.ButtonRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

CalendarPicker

Renders a calendar picker.

Preview

calendarpicker-preview
 CalendarPicker
 Renders a calendar picker.
 Razor demo: CalendarPickerDemo.razor

Usage

<CalendarPicker Width="40" Height="8" />

Demo Source (CalendarPickerDemo.razor)

@using TermBlade.Core.Renderables

<CalendarPicker DisplayMonth="@(new DateOnly(2026, 6, 1))" Width="20" Height="8" />

API Documentation

Razor component: TermBlade.Razor.Components.CalendarPicker. Core renderable: TermBlade.Core.Renderables.CalendarPickerRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

CheckBox

Renders a checkbox control.

Preview

checkbox-preview
 CheckBox
 Renders a checkbox control.
 Razor demo: CheckBoxDemo.razor

Usage

<CheckBox Width="40" Height="8" />

Demo Source (CheckBoxDemo.razor)

@using TermBlade.Core.Renderables

<CheckBox Label="Enable feature" IsChecked="true" Width="32" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.CheckBox. Core renderable: TermBlade.Core.Renderables.CheckBoxRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Dialog

Renders a modal dialog container.

Preview

dialog-preview
 Dialog
 Renders a modal dialog container.
 Razor demo: DialogDemo.razor

Usage

<Dialog Width="40" Height="8" />

Demo Source (DialogDemo.razor)

@using TermBlade.Core.Renderables

<Dialog Width="42" Height="6"><Text Content="Dialog content" Width="30" Height="1" /></Dialog>

API Documentation

Razor component: TermBlade.Razor.Components.Dialog. Core renderable: TermBlade.Core.Renderables.DialogRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

DataGrid

Renders tabular data as a data grid.

Preview

datagrid-preview
 DataGrid
 Renders tabular data as a data grid.
 Razor demo: DataGridDemo.razor

Usage

<DataGrid Width="40" Height="8" />

Demo Source (DataGridDemo.razor)

@using TermBlade.Core.Renderables

<DataGrid Columns="@Columns" Rows="@Rows" Width="52" Height="5" />

@code {
    private static readonly IReadOnlyList<string> Columns = ["Name", "Area"];
    private static readonly IReadOnlyList<IReadOnlyList<string>> Rows = [["Panel", "Widget"], ["Button", "Control"]];
}

API Documentation

Razor component: TermBlade.Razor.Components.DataGrid. Core renderable: TermBlade.Core.Renderables.DataGridRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Expander

Renders an expandable panel.

Preview

expander-preview
 Expander
 Renders an expandable panel.
 Razor demo: ExpanderDemo.razor

Usage

<Expander Width="40" Height="8" />

Demo Source (ExpanderDemo.razor)

@using TermBlade.Core.Renderables

<Expander Width="42" Height="6" IsExpanded="true"><Text Content="Expanded content" Width="30" Height="1" /></Expander>

API Documentation

Razor component: TermBlade.Razor.Components.Expander. Core renderable: TermBlade.Core.Renderables.ExpanderRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Flyout

Renders a floating flyout panel.

Preview

flyout-preview
 Flyout
 Renders a floating flyout panel.
 Razor demo: FlyoutDemo.razor

Usage

<Flyout Width="40" Height="8" />

Demo Source (FlyoutDemo.razor)

@using TermBlade.Core.Renderables

<Flyout Width="42" Height="6"><Text Content="Flyout content" Width="30" Height="1" /></Flyout>

API Documentation

Razor component: TermBlade.Razor.Components.Flyout. Core renderable: TermBlade.Core.Renderables.FlyoutRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Icon

Renders an icon glyph.

Preview

icon-preview
 Icon
 Renders an icon glyph.
 Razor demo: IconDemo.razor

Usage

<Icon Width="40" Height="8" />

Demo Source (IconDemo.razor)

@using TermBlade.Core.Renderables

<Icon Content="*" Width="4" Height="1" Fg="#f38ba8" />

API Documentation

Razor component: TermBlade.Razor.Components.Icon. Core renderable: TermBlade.Core.Renderables.IconRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Image

Renders terminal image content.

Preview

image-preview
 Image
 Renders terminal image content.
 Razor demo: ImageDemo.razor

Usage

<Image Width="40" Height="8" />

Demo Source (ImageDemo.razor)

@using TermBlade.Core.Renderables

<Image Width="32" Height="6" />

API Documentation

Razor component: TermBlade.Razor.Components.Image. Core renderable: TermBlade.Core.Renderables.ImageRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

MessageBox

Renders a modal message box.

Preview

messagebox-preview
 MessageBox
 Renders a modal message box.
 Razor demo: MessageBoxDemo.razor

Usage

<MessageBox Width="40" Height="8" />

Demo Source (MessageBoxDemo.razor)

@using TermBlade.Core.Renderables

<MessageBox Width="42" Height="6"><Text Content="Message text" Width="30" Height="1" /></MessageBox>

API Documentation

Razor component: TermBlade.Razor.Components.MessageBox. Core renderable: TermBlade.Core.Renderables.MessageBoxRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

NumericUpDown

Renders a numeric up/down control.

Preview

numericupdown-preview
 NumericUpDown
 Renders a numeric up/down control.
 Razor demo: NumericUpDownDemo.razor

Usage

<NumericUpDown Width="40" Height="8" />

Demo Source (NumericUpDownDemo.razor)

@using TermBlade.Core.Renderables

<NumericUpDown Value="42" Step="2" Width="20" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.NumericUpDown. Core renderable: TermBlade.Core.Renderables.NumericUpDownRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

ProgressBar

Renders a progress bar.

Preview

progressbar-preview
 ProgressBar
 Renders a progress bar.
 Razor demo: ProgressBarDemo.razor

Usage

<ProgressBar Width="40" Height="8" />

Demo Source (ProgressBarDemo.razor)

@using TermBlade.Core.Renderables

<ProgressBar Value="0.65" Width="42" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.ProgressBar. Core renderable: TermBlade.Core.Renderables.ProgressBarRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

RadioButton

Renders a radio button control.

Preview

radiobutton-preview
 RadioButton
 Renders a radio button control.
 Razor demo: RadioButtonDemo.razor

Usage

<RadioButton Width="40" Height="8" />

Demo Source (RadioButtonDemo.razor)

@using TermBlade.Core.Renderables

<RadioButton Label="Choice A" IsChecked="true" Width="24" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.RadioButton. Core renderable: TermBlade.Core.Renderables.RadioButtonRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

RelativePanel

Renders a relative-positioned panel.

Preview

relativepanel-preview
 RelativePanel
 Renders a relative-positioned panel.
 Razor demo: RelativePanelDemo.razor

Usage

<RelativePanel Width="40" Height="8" />

Demo Source (RelativePanelDemo.razor)

@using TermBlade.Core.Renderables

<RelativePanel Width="42" Height="6"><Text Content="Relative content" Width="30" Height="1" /></RelativePanel>

API Documentation

Razor component: TermBlade.Razor.Components.RelativePanel. Core renderable: TermBlade.Core.Renderables.RelativePanelRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

ScrollViewer

Renders a scrollable viewer container.

Preview

scrollviewer-preview
 ScrollViewer
 Renders a scrollable viewer container.
 Razor demo: ScrollViewerDemo.razor

Usage

<ScrollViewer Width="40" Height="8" />

Demo Source (ScrollViewerDemo.razor)

@using TermBlade.Core.Renderables

<ScrollViewer Width="44" Height="6"><Text Content="Scrollable content line" Width="36" Height="1" /></ScrollViewer>

API Documentation

Razor component: TermBlade.Razor.Components.ScrollViewer. Core renderable: TermBlade.Core.Renderables.ScrollViewerRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

Tab

Renders a tab item label.

Preview

tab-preview
 Tab
 Renders a tab item label.
 Razor demo: TabDemo.razor

Usage

<Tab Width="40" Height="8" />

Demo Source (TabDemo.razor)

@using TermBlade.Core.Renderables

<Tab Content="Overview" IsSelected="true" Width="16" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.Tab. Core renderable: TermBlade.Core.Renderables.TabRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

ToggleSwitch

Renders an on/off toggle switch.

Preview

toggleswitch-preview
 ToggleSwitch
 Renders an on/off toggle switch.
 Razor demo: ToggleSwitchDemo.razor

Usage

<ToggleSwitch Width="40" Height="8" />

Demo Source (ToggleSwitchDemo.razor)

@using TermBlade.Core.Renderables

<ToggleSwitch Label="Live updates" IsOn="true" Width="28" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.ToggleSwitch. Core renderable: TermBlade.Core.Renderables.ToggleSwitchRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Live Component

ProgressDisplay

Renders live progress status with a progress bar.

Preview

progressdisplay-preview
 ProgressDisplay
 Renders live progress status with a progress bar.
 Razor demo: ProgressDisplayDemo.razor

Usage

<ProgressDisplay Width="40" Height="8" />

Demo Source (ProgressDisplayDemo.razor)

@using TermBlade.Core.Renderables

<ProgressDisplay Value="0.72" Width="42" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.ProgressDisplay. Core renderable: TermBlade.Core.Renderables.ProgressDisplayRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Live Component

StatusDisplay

Renders a live status line.

Preview

statusdisplay-preview
 StatusDisplay
 Renders a live status line.
 Razor demo: StatusDisplayDemo.razor

Usage

<StatusDisplay Width="40" Height="8" />

Demo Source (StatusDisplayDemo.razor)

@using TermBlade.Core.Renderables

<StatusDisplay Content="Running" Width="32" Height="1" Fg="#a6e3a1" />

API Documentation

Razor component: TermBlade.Razor.Components.StatusDisplay. Core renderable: TermBlade.Core.Renderables.StatusDisplayRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Live Component

LiveDisplay

Renders a live-updating display container.

Preview

livedisplay-preview
 LiveDisplay
 Renders a live-updating display container.
 Razor demo: LiveDisplayDemo.razor

Usage

<LiveDisplay Width="40" Height="8" />

Demo Source (LiveDisplayDemo.razor)

@using TermBlade.Core.Renderables

<LiveDisplay Width="42" Height="6"><Text Content="Live display content" Width="30" Height="1" /></LiveDisplay>

API Documentation

Razor component: TermBlade.Razor.Components.LiveDisplay. Core renderable: TermBlade.Core.Renderables.LiveDisplayRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Prompts Component

TextPrompt

Renders a text prompt.

Preview

textprompt-preview
 TextPrompt
 Renders a text prompt.
 Razor demo: TextPromptDemo.razor

Usage

<TextPrompt Width="40" Height="8" />

Demo Source (TextPromptDemo.razor)

@using TermBlade.Core.Renderables

<TextPrompt Value="termblade" Placeholder="Name" Width="32" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.TextPrompt. Core renderable: TermBlade.Core.Renderables.TextPromptRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Prompts Component

SelectionPrompt

Renders a single-selection prompt.

Preview

selectionprompt-preview
 SelectionPrompt
 Renders a single-selection prompt.
 Razor demo: SelectionPromptDemo.razor

Usage

<SelectionPrompt Width="40" Height="8" />

Demo Source (SelectionPromptDemo.razor)

@using TermBlade.Core.Renderables

<SelectionPrompt Options="@Options" SelectedIndex="1" Width="34" Height="4" />

@code {
    private static readonly List<SelectOption> Options = [new() { Name = "Core" }, new() { Name = "Razor" }, new() { Name = "Docs" }];
}

API Documentation

Razor component: TermBlade.Razor.Components.SelectionPrompt. Core renderable: TermBlade.Core.Renderables.SelectionPromptRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Prompts Component

MultiSelectionPrompt

Renders a multi-selection prompt.

Preview

multiselectionprompt-preview
 MultiSelectionPrompt
 Renders a multi-selection prompt.
 Razor demo: MultiSelectionPromptDemo.razor

Usage

<MultiSelectionPrompt Width="40" Height="8" />

Demo Source (MultiSelectionPromptDemo.razor)

@using TermBlade.Core.Renderables

<MultiSelectionPrompt Options="@Options" SelectedIndices="@Selected" Width="34" Height="4" />

@code {
    private static readonly List<SelectOption> Options = [new() { Name = "Core" }, new() { Name = "Razor" }, new() { Name = "Docs" }];
    private static readonly HashSet<int> Selected = [0, 2];
}

API Documentation

Razor component: TermBlade.Razor.Components.MultiSelectionPrompt. Core renderable: TermBlade.Core.Renderables.MultiSelectionPromptRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Prompts Component

AutoComplete

Renders an autocomplete prompt.

Preview

autocomplete-preview
 AutoComplete
 Renders an autocomplete prompt.
 Razor demo: AutoCompleteDemo.razor

Usage

<AutoComplete Width="40" Height="8" />

Demo Source (AutoCompleteDemo.razor)

@using TermBlade.Core.Renderables

<AutoComplete Options="@Options" SelectedIndex="0" Width="34" Height="4" />

@code {
    private static readonly List<SelectOption> Options = [new() { Name = "Alpha" }, new() { Name = "Beta" }, new() { Name = "Gamma" }];
}

API Documentation

Razor component: TermBlade.Razor.Components.AutoComplete. Core renderable: TermBlade.Core.Renderables.AutoCompleteRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Prompts Component

ComboBox

Renders a combobox prompt.

Preview

combobox-preview
 ComboBox
 Renders a combobox prompt.
 Razor demo: ComboBoxDemo.razor

Usage

<ComboBox Width="40" Height="8" />

Demo Source (ComboBoxDemo.razor)

@using TermBlade.Core.Renderables

<ComboBox Options="@Options" SelectedIndex="2" Width="34" Height="4" />

@code {
    private static readonly List<SelectOption> Options = [new() { Name = "Small" }, new() { Name = "Medium" }, new() { Name = "Large" }];
}

API Documentation

Razor component: TermBlade.Razor.Components.ComboBox. Core renderable: TermBlade.Core.Renderables.ComboBoxRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Controls Component

GradientBrush

Renders a gradient brush preview.

Preview

gradientbrush-preview
 GradientBrush
 Renders a gradient brush preview.
 Razor demo: GradientBrushDemo.razor

Usage

<GradientBrush Width="40" Height="8" />

Demo Source (GradientBrushDemo.razor)

@using TermBlade.Core.Renderables

<GradientBrush StartColor="#89b4fa" EndColor="#a6e3a1" Width="32" Height="1" />

API Documentation

Razor component: TermBlade.Razor.Components.GradientBrush. Core renderable: TermBlade.Core.Renderables.GradientBrushRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Compatibility Aliases Component

CalendarPiker

Compatibility alias for CalendarPicker.

Preview

calendarpiker-preview
 CalendarPiker
 Compatibility alias for CalendarPicker.
 Razor demo: CalendarPikerDemo.razor

Usage

<CalendarPiker Width="40" Height="8" />

Demo Source (CalendarPikerDemo.razor)

@using TermBlade.Core.Renderables

<CalendarPiker Width="20" Height="8" />

API Documentation

Razor component: TermBlade.Razor.Components.CalendarPiker. Core renderable: TermBlade.Core.Renderables.CalendarPikerRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Compatibility Aliases Component

Dislog

Compatibility alias for Dialog.

Preview

dislog-preview
 Dislog
 Compatibility alias for Dialog.
 Razor demo: DislogDemo.razor

Usage

<Dislog Width="40" Height="8" />

Demo Source (DislogDemo.razor)

@using TermBlade.Core.Renderables

<Dislog Width="42" Height="6"><Text Content="Dialog alias" Width="30" Height="1" /></Dislog>

API Documentation

Razor component: TermBlade.Razor.Components.Dislog. Core renderable: TermBlade.Core.Renderables.DislogRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Compatibility Aliases Component

MassageBox

Compatibility alias for MessageBox.

Preview

massagebox-preview
 MassageBox
 Compatibility alias for MessageBox.
 Razor demo: MassageBoxDemo.razor

Usage

<MassageBox Width="40" Height="8" />

Demo Source (MassageBoxDemo.razor)

@using TermBlade.Core.Renderables

<MassageBox Width="42" Height="6"><Text Content="Message alias" Width="30" Height="1" /></MassageBox>

API Documentation

Razor component: TermBlade.Razor.Components.MassageBox. Core renderable: TermBlade.Core.Renderables.MassageBoxRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.

Compatibility Aliases Component

SrollViewer

Compatibility alias for ScrollViewer.

Preview

srollviewer-preview
 SrollViewer
 Compatibility alias for ScrollViewer.
 Razor demo: SrollViewerDemo.razor

Usage

<SrollViewer Width="40" Height="8" />

Demo Source (SrollViewerDemo.razor)

@using TermBlade.Core.Renderables

<SrollViewer Width="44" Height="6"><Text Content="Scroll alias" Width="30" Height="1" /></SrollViewer>

API Documentation

Razor component: TermBlade.Razor.Components.SrollViewer. Core renderable: TermBlade.Core.Renderables.SrollViewerRenderable.

Common Layout Parameters

Supports the shared TermBlade Razor layout parameters inherited from RenderableComponentBase, including size, flex settings, position offsets, margin, padding, visibility, opacity, focus, and autofocus.