BlazOrbit.SyntaxHighlight 1.0.0-preview.38

This is a prerelease version of BlazOrbit.SyntaxHighlight.
There is a newer version of this package available.
See the version list below for details.
dotnet add package BlazOrbit.SyntaxHighlight --version 1.0.0-preview.38
                    
NuGet\Install-Package BlazOrbit.SyntaxHighlight -Version 1.0.0-preview.38
                    
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="BlazOrbit.SyntaxHighlight" Version="1.0.0-preview.38" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="BlazOrbit.SyntaxHighlight" Version="1.0.0-preview.38" />
                    
Directory.Packages.props
<PackageReference Include="BlazOrbit.SyntaxHighlight" />
                    
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 BlazOrbit.SyntaxHighlight --version 1.0.0-preview.38
                    
#r "nuget: BlazOrbit.SyntaxHighlight, 1.0.0-preview.38"
                    
#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 BlazOrbit.SyntaxHighlight@1.0.0-preview.38
                    
#: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=BlazOrbit.SyntaxHighlight&version=1.0.0-preview.38&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=BlazOrbit.SyntaxHighlight&version=1.0.0-preview.38&prerelease
                    
Install as a Cake Tool

BlazOrbit

NuGet Build Build License: MIT

A modern and customizable component library for Blazor on .NET.

BlazOrbit ships accessible, production-ready components built on a reflective styling pipeline (data-bob-* attributes + CSS custom properties). It supports design tokens, component variants, theming, customization. It provides optional localization integration.

BlazOrbit is built on several key principles:

  • Efficiency and fluidity

It avoids unnecessary boilerplate code, and component rendering is centralized in a process that prioritizes efficiency.

  • Less JS, more happiness

The use of JS is minimized as much as possible. Typescript is used in development with efficient bundling.

  • Don’t reinvent the wheel

Everything you do in Blazor works in BlazOrbit. In cases such as form components, it uses InputBase just like native components. But it improves the usability of native components and adds features (Styling, Validation...).

  • Accessibility

Make it easy for users to create accessible applications transparently by following the WCAG 2.2 standard.

  • Customization

In addition to exposing variables to modify the theme, BlazOrbit includes a system that allows you to create registered component variants in the same way you would register a service.

  • Continuous Development

BlazOrbit is not a closed-source project; it is distributed under the MIT license, and contributions are welcome. The goal is continuous improvement and the ongoing addition of new features.


Quickstart

Start a new project

The fastest path. Install the templates package once:

dotnet new install BlazOrbit.Templates

Then scaffold a Blazor Server or WebAssembly project — pick the framework and toggle localization on demand:

# Blazor Server, .NET 10
dotnet new blazorbit-server -n MyApp -F net10.0

# Blazor WebAssembly, .NET 8, with localization
dotnet new blazorbit-wasm -n MyApp -F net8.0 -IncludeLocalization true

cd MyApp
dotnet run

The generated app ships a showcase Home page, theme switcher, modal/toast hosts, favicon set, and (when localization is enabled) a culture selector — all already wired through BOBInitializer. See the Templates guide for the full matrix of options.

Add to an existing project

Install the main package:

dotnet add package BlazOrbit

Register the services in Program.cs:

using BlazOrbit;

builder.Services.AddBlazOrbit();

Add <BOBInitializer> once in your root layout (typically MainLayout.razor) as wrapper of the @Body content. This wires up the theme, JS interop, and static assets:

<BOBInitializer DefaultTheme="dark">
    <main>
        @Body
    </main>
</BOBInitializer>

Optionally add hosts after BOBInitializer:

  • BOBDialog and BOBDrawer require <BOBModalHost />
  • BOBToast require <BOBToastHost MaxVisiblePerPosition="5" />
<BOBInitializer DefaultTheme="dark">
    <main>
        @Body
    </main>
</BOBInitializer>
<BOBModalHost />
<BOBToastHost MaxVisiblePerPosition="5" />

Now you can use any component:

@using BlazOrbit.Components

<BOBButton Variant="BOBButtonVariant.Filled" OnClick="@HandleClick">
    Click me
</BOBButton>

<BOBInputText @bind-Value="name" Label="Name" />

<BOBCard Shadow="true">
    <p>Inside a themed card.</p>
</BOBCard>

Packages

Package Purpose
BlazOrbit Component library — components, variants, theming, and JS behaviors.
BlazOrbit.Core Framework-agnostic primitives — base component types, behavior interfaces (IHas*), palette and theme types.
BlazOrbit.SyntaxHighlight Dependency-free syntax highlighter used by BOBCodeBlock.
BlazOrbit.Localization.Server Cookie-based culture persistence and BOBCultureSelector for Blazor Server.
BlazOrbit.Localization.Wasm localStorage-based culture persistence and BOBCultureSelector for Blazor WebAssembly.
BlazOrbit.FormsFluentValidation Integration with FluentValidation for BlazOrbit forms.

Localization: Server vs. WASM

Both localization packages expose the same BOBCultureSelector component but store the selected culture differently:

  • BlazOrbit.Localization.Server — for Blazor Server hosts. Sets up RequestLocalization, persists culture via HTTP cookie, and exposes a /Culture/Set endpoint.
  • BlazOrbit.Localization.Wasm — for Blazor WebAssembly hosts. Persists culture in localStorage and configures CultureInfo.DefaultThreadCurrentCulture / DefaultThreadCurrentUICulture at startup.

For prerendered WASM (hosted WASM with Server prerender), install both packages. Server handles the initial HTTP request culture and WASM takes over after boot.

Read more here about localization integration


Features

  • Theming — Built-in light and dark themes with CSS custom properties and automatic palette generation. Override --palette-* to re-skin colors and --bob-* to retune typography, sizing, density, borders, focus, z-index, ripple, scrollbar, and input/picker family defaults.
  • Variants — Register custom rendering templates for any component via AddBlazOrbitVariants(...).
  • Design Tokens — Unified typography, sizing, density, borders, outline, opacity, z-index, ripple, and family defaults — all overridable from a single CSS var.
  • Accessibility — ARIA attributes, keyboard navigation, and focus management built in.
  • Form Integration — Full EditContext / EditForm support with validation states. Custom FluentValidation Validator ready to use.
  • JS Interop — Modular TypeScript interop for dropdowns, modals, clipboard, color picking, drag-and-drop, and more.
  • Scoped CSS — Each component ships scoped .razor.css alongside a globally generated CSS bundle.
  • Localization Ready — Server and WASM localization packages with culture selector UI.

Documentation

Documentation, component catalog and live demos can be found and installed from the website

Autogenerated API reference is generated using DocFX

Both are included in the codebase so are closely linked to code development.

You un it locally:

dotnet run --project docs/BlazOrbit.Docs.Wasm

AI assistant integration

BlazOrbit ships a .skill bundle that teaches AI coding agents to use the canonical component API, theming pipeline, and conventions — no more hallucinated parameters or stale BOB* signatures. The bundle is regenerated against every release so the agent's mental model stays in lock-step with the published library.

Download the latest bundle from the GitHub release:

curl -L -o blazorbit-user.skill \
  https://github.com/BlazOrbit/BlazOrbit/releases/latest/download/blazorbit-user.skill

Compatible loaders:

  • Claude Code — extract into ~/.claude/skills/blazorbit-user/.
  • Kimi (Moonshot) — upload through the Skills tab in the web UI.
  • OpenCode — extract into the workspace skills/ folder and reference it from opencode.json.
  • Generic loaders — any agent that consumes the public Anthropic Skill format (SKILL.md at the archive root with optional references/ and scripts/).

See the AI Skill guide for per-agent install snippets, verification prompts, update flow, and contributor instructions for building the bundle locally.


Contributing

We welcome contributions. See CONTRIBUTING.md for the full workflow, branch and commit conventions, and development setup.

Also scripts under the scripts folder are done to facilitate contributions to be more friendly to new contributors and avoid endless PRs.

Bug reports and feature requests: GitHub Issues.


License

Released under the MIT License.
© 2026 BlazOrbit

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

    • No dependencies.
  • net8.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on BlazOrbit.SyntaxHighlight:

Package Downloads
BlazOrbit.CodeBlock

Syntax-highlighted code block component for BlazOrbit. Ships with copy-to-clipboard, language badges and automatic indentation normalization.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 144 6/9/2026
1.0.0-preview.47 90 5/14/2026
1.0.0-preview.46 86 5/14/2026
1.0.0-preview.39 86 5/7/2026
1.0.0-preview.38 71 5/7/2026
1.0.0-preview.35 80 5/7/2026
1.0.0-preview.31 76 5/6/2026
1.0.0-preview.30 67 5/6/2026
1.0.0-preview.28 69 5/6/2026
1.0.0-preview.27 77 5/4/2026
1.0.0-preview.26 70 5/4/2026
1.0.0-preview.25 83 5/3/2026
1.0.0-preview.24 72 5/3/2026
1.0.0-preview.23 77 5/3/2026
1.0.0-preview.22 69 5/3/2026
1.0.0-preview.21 77 5/3/2026
1.0.0-preview.20 78 5/3/2026
1.0.0-preview.19 73 5/3/2026
0.1.1-preview.12 80 5/3/2026
0.1.1-preview.11 83 5/2/2026
Loading failed