Content Component
Text
Renders styled text with color and formatting options.
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
| Name | Type | Default | Description |
|---|---|---|---|
Content | string | "" | The text content to display. |
Fg | string? | null | Foreground color as hex string (e.g. #ffffff). |
Bg | string? | null | Background color as hex string. |
TextAlign | string | "left" | Text alignment: left, center, or right. |
Wrap | bool | true | Whether to wrap text at component boundary. |
Attributes | TextAttributes | TextAttributes.None | Text formatting: Bold, Dim, Italic, Underline, Blink, Inverse, Strikethrough. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
SegmentedText
Renders terminal text from independently styled segments, including foreground colors, backgrounds, and text attributes.
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
| Name | Type | Default | Description |
|---|---|---|---|
Segments | IReadOnlyList<SegmentedTextSegment> | [] | Ordered text segments with independent foreground, background, and attributes. |
BackgroundColor | string | "transparent" | Optional background fill color for the whole component. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
Code
Displays syntax-highlighted source code with optional line numbers.
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
| Name | Type | Default | Description |
|---|---|---|---|
Content | string | "" | The source code text to display. |
Language | string | "" | Programming language for syntax highlighting (e.g. csharp, javascript). |
ShowLineNumbers | bool | true | Whether to show line numbers in the gutter. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
Markdown
Renders Markdown content with formatting for headings, lists, code blocks, and more.
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
| Name | Type | Default | Description |
|---|---|---|---|
Content | string | "" | The Markdown text to render. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
Diff
Shows a side-by-side or unified diff view comparing two text inputs.
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
| Name | Type | Default | Description |
|---|---|---|---|
OldText | string | "" | The original text for comparison. |
NewText | string | "" | The modified text for comparison. |
ShowLineNumbers | bool | true | Whether to display line numbers. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
AsciiFont
Renders large ASCII art text using various font styles.
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
| Name | Type | Default | Description |
|---|---|---|---|
Text | string | "" | The text to render as ASCII art. |
Font | string | "normal" | Font style: normal, block, etc. |
Color | string? | null | Text color as hex string. |
BackgroundColor | string? | null | Background color as hex string. |
SelectionBg | string | "#4a5568" | Selection background color. |
SelectionFg | string | "#ffffff" | Selection foreground color. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
LineNumbers
Displays a column of line numbers, useful alongside code or text editors.
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
| Name | Type | Default | Description |
|---|---|---|---|
LineCount | int | 0 | Total number of lines to display. |
StartLine | int | 1 | Starting line number. |
Fg | string? | "#666666" | Foreground color for line numbers. |
Bg | string? | null | Background color. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
FrameBuffer
Provides a raw pixel-level drawing canvas for custom rendering.
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
| Name | Type | Default | Description |
|---|---|---|---|
PixelWidth | int | 120 | Width of the pixel buffer in characters. |
PixelHeight | int | 40 | Height of the pixel buffer in characters. |
Draw | Action<FrameBufferRenderable>? | null | Custom draw callback invoked each render frame. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
Table
Displays tabular data with headers, borders, row separators, captions, and viewport offsets.
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
| Name | Type | Default | Description |
|---|---|---|---|
Headers | IReadOnlyList<string> | [] | Column header labels. |
Rows | IReadOnlyList<IReadOnlyList<string>> | [] | Cell values grouped by row. |
RowOffset / ColumnOffset | int | 0 | Viewport offsets for scrolling rows and columns. |
VisibleRowCount | int | 20 | Maximum number of body rows rendered. |
MinColumnWidth / MaxColumnWidth | int | 6 / 32 | Column width bounds before truncation. |
MaxVisibleWidth | int | 120 | Maximum table layout width before horizontal clipping. |
ShowHeaders | bool | true | Whether to render the header row and separator. |
ShowBorder | bool | true | Whether the wrapping box draws a border. |
ShowRowSeparators | bool | false | Whether to draw a separator after each visible row. |
Title / Caption | string? | null | Top and bottom border labels. |
TitleAlignment / CaptionAlignment | string | "left" / "right" | Alignment of the top and bottom titles. |
BorderStyle | string | "rounded" | Border style (e.g. single, double, rounded). |
BorderColor / HeaderColor / TextColor / BackgroundColor | string | "#38bdf8" / "#facc15" / "#e5e7eb" / "#020617" | Hex colors for borders, headers, text, and background. |
HeaderAttributes | TextAttributes | TextAttributes.Bold | Text formatting attributes for the header row. |
Content Component
Calendar
Renders a monthly calendar grid with configurable day colors and date highlighting.
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
| Name | Type | Default | Description |
|---|---|---|---|
DisplayMonth | DateOnly | DateOnly.FromDateTime(DateTime.Today) | Month to render. |
HighlightedDate | DateOnly? | DateOnly.FromDateTime(DateTime.Today) | Date to highlight using HighlightColor. |
TitleColor | string | "#ffffff" | Color for month and year title text. |
TitleAlignment | string | "center" | Title alignment: left, center, or right. |
DayNameColor | string | "#00c000" | Color for day name headers (Su to Sa). |
DayColor | string | "#ffffff" | Color for days in the active month. |
OtherMonthDayColor | string | "#555555" | Color for leading/trailing days when ShowOtherMonthDays is enabled. |
HighlightColor | string | "#ff0000" | Color for the highlighted date. |
BackgroundColor | string? | null | Background color for the calendar. |
AlternateRowBackgroundColor | string? | null | Optional background color for alternating week rows. |
ShowOtherMonthDays | bool | true | Whether to render adjacent-month days in partial weeks. |
Input Component
Input
A single-line text input with placeholder, cursor, and validation support.
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
| Name | Type | Default | Description |
|---|---|---|---|
Value | string? | null | Current text value of the input. |
ValueChanged | EventCallback<string> | - | Callback when value changes (two-way binding). |
OnInput | EventCallback<string> | - | Callback on each keystroke. |
OnChange | EventCallback<string> | - | Callback when input loses focus with changed value. |
OnEnter | EventCallback<string> | - | Callback when Enter key is pressed. |
Placeholder | string? | null | Placeholder text shown when empty. |
PlaceholderColor | string? | null | Color of placeholder text. |
CursorColor | string? | null | Color of the text cursor. |
Fg | string? | null | Text foreground color. |
Bg | string? | null | Text background color. |
MaxLength | int? | null | Maximum number of characters allowed. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
Textarea
A multi-line text editor with word wrapping and cursor navigation.
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
| Name | Type | Default | Description |
|---|---|---|---|
Value | string | "" | Current text content. |
ValueChanged | EventCallback<string> | - | Callback when value changes (two-way binding). |
OnInput | EventCallback<string> | - | Callback on each keystroke. |
Placeholder | string? | null | Placeholder text when empty. |
WrapMode | string | "word" | Text wrapping mode: word or none. |
Fg | string? | null | Text foreground color. |
Bg | string? | null | Text background color. |
ShowCursor | bool | true | Whether to display the text cursor. |
CursorColor | string? | null | Color of the text cursor. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
Slider
A draggable slider control for numeric value selection.
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
| Name | Type | Default | Description |
|---|---|---|---|
Min | float | 0 | Minimum value. |
Max | float | 100 | Maximum value. |
Value | float | 50 | Current value. |
ValueChanged | EventCallback<float> | - | Callback when value changes (two-way binding). |
OnValueChanged | EventCallback<float> | - | Callback when value changes. |
Step | float | 1 | Step increment for value changes. |
Orientation | string | "horizontal" | Slider orientation: horizontal or vertical. |
TrackColor | string? | null | Color of the slider track. |
ThumbColor | string? | null | Color of the slider thumb. |
ValueColor | string? | null | Color of the value display. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
Select
A scrollable list for single item selection with keyboard navigation.
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
| Name | Type | Default | Description |
|---|---|---|---|
Options | List<SelectOption> | [] | List of selectable options. |
SelectedIndex | int | 0 | Index of the currently selected option. |
SelectedIndexChanged | EventCallback<int> | - | Callback when selection changes (two-way binding). |
OnSelectionChanged | EventCallback<int> | - | Callback when selection changes. |
OnItemSelected | EventCallback<SelectOption> | - | Callback when an item is confirmed/selected. |
ShowDescription | bool | true | Whether to show option descriptions. |
ShowScrollIndicator | bool | true | Whether to show scroll indicators. |
SelectedBg | string? | "#0055aa" | Background color of the selected item. |
Fg | string? | null | Text foreground color. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Chart Component
BarChart
Renders vertical, horizontal, or sparkline bar charts from numeric data.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<double> | [] | Numeric values to chart. |
Labels | IReadOnlyList<string>? | null | Optional labels for bars. |
Orientation | string | "vertical" | Vertical or horizontal layout. |
Sparkline | bool | false | Compact sparkline rendering mode. |
BarColor | string? | null | Primary bar color. |
Chart Component
LineChart
Renders numeric series as a terminal line chart with optional fill.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<double> | [] | Series values. |
Title | string? | null | Optional chart title. |
LineColor | string? | null | Line stroke color. |
FillColor | string? | null | Optional area fill color. |
Chart Component
TimeSeriesLineChart
Renders timestamped values with formatted X-axis labels.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<TimeSeriesPoint> | [] | Timestamped series values. |
TimeFormat | string | "HH:mm" | Date/time label format. |
LineColor | string? | null | Line stroke color. |
Chart Component
HeatMap
Renders a matrix of values with configurable low, mid, and high colors.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<IReadOnlyList<double>> | [] | Matrix values. |
RowLabels | IReadOnlyList<string>? | null | Optional row labels. |
ColumnLabels | IReadOnlyList<string>? | null | Optional column labels. |
LowColor / MidColor / HighColor | string? | null | Color gradient stops. |
Chart Component
CandlestickChart
Renders OHLC financial data with bull and bear candle colors.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<CandlestickPoint> | [] | OHLC data points. |
BullColor | string? | null | Color for rising candles. |
BearColor | string? | null | Color for falling candles. |
CandleWidth / CandleGap | int | - | Candle geometry controls. |
Chart Component
PieChart
Renders proportional slices with labels and optional animation.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<PieSlice> | [] | Slice values, labels, and colors. |
AnimationDuration | double | 0 | Duration of sweep animation. |
Chart Component
DoughnutChart
Renders a pie-style chart with a hollow center and optional center label.
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
| Name | Type | Default | Description |
|---|---|---|---|
Data | IReadOnlyList<PieSlice> | [] | Slice values, labels, and colors. |
InnerRadius | double | 0.5 | Hollow center radius ratio. |
CenterLabel | string? | null | Text rendered in the center. |
CenterLabelColor | string? | null | Center label color. |
Input Component
TreeView
Displays hierarchical data with expand/collapse navigation, tri-state checkboxes, and filtering.
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
| Name | Type | Default | Description |
|---|---|---|---|
Nodes | List<TreeNode> | [] | Top-level tree nodes to render. |
CheckboxMode | bool | false | Enables tri-state checkbox rendering and toggling with Space/mouse. |
Filter | string? | null | Case-insensitive filter text; matching descendants and ancestor paths stay visible. |
AllowLetterBasedNavigation | bool | true | Typed letters jump to next matching node label. |
Fg | string? | null | Default foreground color for rows. |
SelectedBg | string? | "#0055aa" | Background color for the selected row. |
OnSelectionChanged | EventCallback<TreeNode> | - | Raised when the selected node changes. |
OnNodeToggled | EventCallback<TreeNode> | - | Raised when a node expands or collapses. |
OnNodeChecked | EventCallback<TreeNode> | - | Raised when checkbox state changes. |
OnNodeActivated | EventCallback<TreeNode> | - | Raised when Enter activates a leaf node. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
TabSelect
A horizontal tab bar for switching between views or sections.
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
| Name | Type | Default | Description |
|---|---|---|---|
Tabs | List<string> | [] | List of tab labels. |
SelectedIndex | int | 0 | Index of the active tab. |
SelectedIndexChanged | EventCallback<int> | - | Callback when active tab changes (two-way binding). |
OnTabChanged | EventCallback<int> | - | Callback when active tab changes. |
ActiveFg | string? | null | Foreground color of the active tab. |
ActiveBg | string? | null | Background color of the active tab. |
InactiveFg | string? | null | Foreground color of inactive tabs. |
InactiveBg | string? | null | Background color of inactive tabs. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether 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
┌──────────────────────────────────────────────────────────┐
│ ┌────────────────┐ ┌────────────────┐ ┌────────────────┐│
│ │ 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
| Name | Type | Default | Description |
|---|---|---|---|
BackgroundColor | string | "transparent" | Background color of the box. |
Border | bool | false | Whether to draw a border. |
BorderStyle | string | "single" | Border style: single, double, rounded, bold, etc. |
BorderColor | string | "#ffffff" | Border line color. |
FocusedBorderColor | string? | null | Border color when focused. |
ShouldFill | bool | true | Whether to fill the box area with background color. |
Title | string? | null | Title text displayed in the top border. |
TitleAlignment | string | "left" | Title alignment: left, center, or right. |
BottomTitle | string? | null | Title text displayed in the bottom border. |
BottomTitleAlignment | string | "left" | Bottom title alignment: left, center, or right. |
ChildContent | RenderFragment? | null | Child components to render inside the box. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Container Component
ScrollBox
A scrollable container with configurable scrollbars for content overflow.
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
| Name | Type | Default | Description |
|---|---|---|---|
ScrollX | int | 0 | Horizontal scroll offset. |
ScrollY | int | 0 | Vertical scroll offset. |
StickyScroll | bool | false | Whether to auto-scroll to bottom when content changes. |
ShowVerticalScrollbar | bool | true | Whether to show the vertical scrollbar. |
ShowHorizontalScrollbar | bool | false | Whether to show the horizontal scrollbar. |
Border | bool | true | Whether to draw a border. |
BorderColor | string | "#7aa2f7" | Border line color. |
BackgroundColor | string | "#1a1b26" | Background color. |
TrackColor | string | "#414868" | Scrollbar track color. |
ThumbColor | string | "#7aa2f7" | Scrollbar thumb color. |
ContentWidth | int | 0 | Total width of scrollable content. |
ContentHeight | int | 0 | Total height of scrollable content. |
ChildContent | RenderFragment? | null | Child components to render inside the scroll area. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Container Component
ScrollBar
A standalone scrollbar indicator for custom scroll implementations.
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
| Name | Type | Default | Description |
|---|---|---|---|
Orientation | string | "vertical" | Scrollbar orientation: vertical or horizontal. |
ScrollPosition | int | 0 | Current scroll position. |
ScrollSize | int | 100 | Total scrollable size. |
ViewportSize | int | 10 | Visible viewport size. |
TrackColor | string? | "#333333" | Track background color. |
ThumbColor | string? | "#888888" | Thumb indicator color. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Container Component
ConsoleOverlay
An overlay panel for displaying log messages, errors, and warnings.
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
| Name | Type | Default | Description |
|---|---|---|---|
Position | OverlayPosition | OverlayPosition.BottomRight | Position of the overlay: TopLeft, TopRight, BottomLeft, BottomRight. |
MaxLines | int | 10 | Maximum number of visible log lines. |
MaxWidth | int | 60 | Maximum width of the overlay in characters. |
Lines | IReadOnlyList<string>? | null | Pre-populated log lines. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
Confirm
A yes/no confirmation prompt with keyboard navigation.
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
| Name | Type | Default | Description |
|---|---|---|---|
Message | string | "Are you sure?" | The confirmation message to display. |
Value | bool | false | Current selection (true = Yes, false = No). |
ValueChanged | EventCallback<bool> | - | Callback when the value toggles (two-way binding). |
OnConfirmed | EventCallback<bool> | - | Callback when the user presses Enter, Y, or N. |
YesLabel | string | "Yes" | Label for the affirmative button. |
NoLabel | string | "No" | Label for the negative button. |
Fg | string? | null | Foreground color. |
Bg | string? | null | Background color. |
ActiveBg | string? | "#0055aa" | Background color of the active button. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Content Component
Spinner
An animated spinner indicator with customizable frames and title.
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
| Name | Type | Default | Description |
|---|---|---|---|
Title | string | "" | Text displayed next to the spinner. |
Frames | string[]? | Braille dots | Array of spinner frame characters. |
Interval | double | 0.08 | Seconds between frame advances. |
Fg | string? | null | Foreground color for the title text. |
Bg | string? | null | Background color. |
SpinnerColor | string? | null | Color of the spinner character. |
IsSpinning | bool | true | Whether the spinner is active. |
CompletedText | string? | null | Text shown when spinning stops. Defaults to ✔ + Title. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Input Component
MultiSelect
A selection list allowing multiple items to be toggled on or off.
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
| Name | Type | Default | Description |
|---|---|---|---|
Options | List<SelectOption> | [] | List of selectable options. |
SelectedIndices | HashSet<int> | [] | Set of currently selected option indices. |
SelectedIndicesChanged | EventCallback<HashSet<int>> | - | Callback when selection changes (two-way binding). |
OnSelectionChanged | EventCallback<HashSet<int>> | - | Callback when selection changes. |
OnConfirmed | EventCallback<HashSet<int>> | - | Callback when the user presses Enter to confirm. |
ShowDescription | bool | true | Whether to show option descriptions. |
ShowScrollIndicator | bool | true | Whether to show the scroll indicator. |
CursorBg | string? | "#333333" | Background color of the cursor row. |
SelectedBg | string? | "#0055aa" | Background color of selected rows. |
Fg | string? | null | Foreground text color. |
Common Layout Parameters
| Name | Type | Default | Description |
|---|---|---|---|
Id | string? | null | Unique identifier. |
Width | string? | null | Width (e.g. "100%", "40"). |
Height | string? | null | Height. |
FlexDirection | FlexDirection? | null | Flex layout direction. |
AlignItems | AlignItems? | null | Cross-axis alignment. |
JustifyContent | JustifyContent? | null | Main-axis alignment. |
FlexGrow | float? | null | Flex grow factor. |
FlexShrink | float? | null | Flex shrink factor. |
LayoutPosition | string? | null | Position type. |
Top / Left / Right / Bottom | int? | null | Position offsets. |
PaddingTop / PaddingRight / PaddingBottom / PaddingLeft | int? | null | Padding. |
MarginTop / MarginRight / MarginBottom / MarginLeft | int? | null | Margin. |
ZIndex | int? | null | Stacking order. |
Visible | bool? | null | Visibility toggle. |
Opacity | float? | null | Opacity (0.0 to 1.0). |
Focusable | bool? | null | Whether the component can receive focus. |
AutoFocus | bool | false | Whether to auto-focus on mount. |
Widgets Component
Markup
Renders Spectre-style markup content.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
CalendarPicker
Renders a calendar picker.
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
Carousel
Renders one selected item from a carousel.
Preview
Carousel
Renders one selected item from a carousel.
Razor demo: CarouselDemo.razor
Usage
<Carousel Width="40" Height="8" />
Demo Source (CarouselDemo.razor)
@using TermBlade.Core.Renderables
<Carousel Items="@Items" SelectedIndex="1" Width="32" Height="1" />
@code {
private static readonly IReadOnlyList<string> Items = ["Alpha", "Beta", "Gamma"];
}
API Documentation
Razor component: TermBlade.Razor.Components.Carousel. Core renderable: TermBlade.Core.Renderables.CarouselRenderable.
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
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
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
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
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
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
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
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
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
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
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
RelativePanel
Renders a relative-positioned panel.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.