VOOZH about

URL: https://www.nuget.org/packages/XtermBlazor/

⇱ NuGet Gallery | XtermBlazor 2.4.0




👁 Image
XtermBlazor 2.4.0

dotnet add package XtermBlazor --version 2.4.0
 
 
NuGet\Install-Package XtermBlazor -Version 2.4.0
 
 
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XtermBlazor" Version="2.4.0" />
 
 
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XtermBlazor" Version="2.4.0" />
 
Directory.Packages.props
<PackageReference Include="XtermBlazor" />
 
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XtermBlazor --version 2.4.0
 
 
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: XtermBlazor, 2.4.0"
 
 
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XtermBlazor@2.4.0
 
 
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XtermBlazor&version=2.4.0
 
Install as a Cake Addin
#tool nuget:?package=XtermBlazor&version=2.4.0
 
Install as a Cake Tool
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

XtermBlazor

<img align="right" width="100" height="100" src="https://github.com/BattlefieldDuck/XtermBlazor/assets/29337428/244eb056-4bb1-43a2-85b4-1909034c3ddf">

👁 Dotnet Package
👁 NuGet Version
👁 NuGet Downloads

Brings xterm.js to Blazor

Live Demo: https://xtermblazor.pages.dev

Demo Projects

  • (Blazor Server)
  • (Blazor WebAssembly)

Prerequisites

Before you get started with this project, make sure you have the following software installed on your system:

  • .NET: You will need .NET 6.0 or later for this project.
  • Node.js: This project also requires Node.js version 18 or later.

Installation

1. Install the package

Find the package through NuGet Package Manager or install it with following command.

dotnet add package XtermBlazor

2. Add Imports

After the package is added, you need to add the following in your _Imports.razor

@using XtermBlazor

3. Add CSS & Font references

Add the following to your HTML head section, it's either index.html or _Host.cshtml depending on whether you're running WebAssembly or Server.

<link href="_content/XtermBlazor/XtermBlazor.min.css" rel="stylesheet" />

In the HTML body section of either index.html or _Host.cshtml add this:

<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>

Basic Usage

<Xterm @ref="_terminal" Options="_options" OnFirstRender="@OnFirstRender" />

@code {
 private Xterm _terminal;

 private TerminalOptions _options = new TerminalOptions
 {
 CursorBlink = true,
 CursorStyle = CursorStyle.Bar,
 Theme =
 {
 Background = "#17615e",
 },
 };

 private async Task OnFirstRender()
 {
 await _terminal.WriteLine("Hello World");
 }
}

Addons

Xterm supports Addons

To use @xterm/addon-fit addon, you need to add the following to your HTML body section either index.html or _Host.cshtml.

Blazor WebAssembly index.html


<script src="https://cdn.jsdelivr.net/npm/@xterm/addon-fit@0.11.0/lib/addon-fit.min.js"></script>

<script src="_framework/blazor.webassembly.js"></script>
<script>navigator.serviceWorker.register('service-worker.js');</script>


<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>
<script>XtermBlazor.registerAddons({"addon-fit": new FitAddon.FitAddon()});</script>

Blazor Server _Host.cshtml


<script src="https://cdn.jsdelivr.net/npm/@@xterm/addon-fit@0.11.0/lib/addon-fit.min.js"></script>

<script src="_framework/blazor.server.js"></script>


<script src="_content/XtermBlazor/XtermBlazor.min.js"></script>
<script>XtermBlazor.registerAddons({"addon-fit": new FitAddon.FitAddon()});</script>

Usage with addons

<Xterm @ref="_terminal" Options="_options" Addons="_addons" OnFirstRender="@OnFirstRender" />

@code {
 private Xterm _terminal;

 private TerminalOptions _options = new TerminalOptions
 {
 CursorBlink = true,
 CursorStyle = CursorStyle.Bar,
 };

 private HashSet<string> _addons = new HashSet<string>()
 {
 "addon-fit",
 };

 private async Task OnFirstRender()
 {
 // Invoke fit() function
 await _terminal.Addon("addon-fit").InvokeVoidAsync("fit");

 await _terminal.WriteLine("Hello World");
 }
}

Real-world uses

  • SharpIDE: A modern, cross platform IDE for .NET, built with .NET & Godot
  • Moonlight: The next generation hosting panel
  • LANCommander: LANCommander is an open-source digital game platform.
  • KubeUI: Kubernetes User Interface
  • blazork8s: About manage k8s using c# blazor enhance by chatgpt, try something new!使用blazor技术开发的内置OpenAI GPT的k8s 管理界面
  • And much more...

Contributing

Contributions are welcome! Please feel free to submit pull requests or open issues.

License

XtermBlazor is licensed under the MIT License. See the LICENSE file for more details.

Stargazers over time

Product Versions Compatible and additional computed target framework versions.
.NET net6.0 net6.0 is compatible.  net6.0-android net6.0-android was computed.  net6.0-ios net6.0-ios was computed.  net6.0-maccatalyst net6.0-maccatalyst was computed.  net6.0-macos net6.0-macos was computed.  net6.0-tvos net6.0-tvos was computed.  net6.0-windows net6.0-windows was computed.  net7.0 net7.0 is compatible.  net7.0-android net7.0-android was computed.  net7.0-ios net7.0-ios was computed.  net7.0-maccatalyst net7.0-maccatalyst was computed.  net7.0-macos net7.0-macos was computed.  net7.0-tvos net7.0-tvos was computed.  net7.0-windows net7.0-windows was computed.  net8.0 net8.0 is compatible.  net8.0-android net8.0-android was computed.  net8.0-browser net8.0-browser was computed.  net8.0-ios net8.0-ios was computed.  net8.0-maccatalyst net8.0-maccatalyst was computed.  net8.0-macos net8.0-macos was computed.  net8.0-tvos net8.0-tvos was computed.  net8.0-windows net8.0-windows was computed.  net9.0 net9.0 is compatible.  net9.0-android net9.0-android was computed.  net9.0-browser net9.0-browser was computed.  net9.0-ios net9.0-ios was computed.  net9.0-maccatalyst net9.0-maccatalyst was computed.  net9.0-macos net9.0-macos was computed.  net9.0-tvos net9.0-tvos was computed.  net9.0-windows net9.0-windows was computed.  net10.0 net10.0 is compatible.  net10.0-android net10.0-android was computed.  net10.0-browser net10.0-browser was computed.  net10.0-ios net10.0-ios was computed.  net10.0-maccatalyst net10.0-maccatalyst was computed.  net10.0-macos net10.0-macos was computed.  net10.0-tvos net10.0-tvos was computed.  net10.0-windows net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (2)

Showing the top 2 NuGet packages that depend on XtermBlazor:

Package Downloads
Quick.Blazor.Bootstrap.Terminal

Quick.Blazor.Bootstrap.Terminal is a component library for Terminal built on top of Blazor and CSS frameworks Bootstrap.

MoonlightPluginBase

Use this package to install all dependencies a moonlight plugins needs

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on XtermBlazor:

Repository Stars
MattParkerDev/SharpIDE
A modern, cross platform IDE for .NET, built with .NET & Godot
LANCommander/LANCommander
weibaohui/blazork8s
manage k8s using c# blazor enhance by chatgpt ,try something new !使用blazor技术开发的内置OpenAI GPT的k8s 管理界面
Version Downloads Last Updated
2.4.0 676 5/4/2026
2.3.0 5,849 12/23/2025
2.2.0 3,440 9/29/2025
2.1.2 34,918 9/18/2024
2.1.1 3,734 7/10/2024
2.1.0 4,760 4/16/2024
2.0.0 870 3/8/2024
1.10.2 8,569 2/5/2024
1.10.1 292 1/29/2024
1.10.0 2,663 9/27/2023
1.9.0 4,017 6/28/2023
1.8.1 2,131 3/22/2023
1.8.0 427 3/22/2023
1.7.0 728 2/19/2023
1.6.1 6,914 9/20/2022
1.6.0 706 9/18/2022
1.5.2 729 9/7/2022
1.5.1 618 9/2/2022
1.5.0 1,210 4/13/2022
1.4.0 699 2/22/2022
Loading failed