BlazorNova BlazorNova
BlazorNova BlazorNova
☰
☰ Menu
Getting Started
Installation
Project Setup
Source Generator
Core Concepts
Surface System
Color Palette
Fluent CSS API
Style Overrides
CSS Precedence
BlazorNova Classes
Layout
Flexbox & Grid
Spacing
Sizing
Typography
Backgrounds
Borders
Effects
Filters
Transitions & Transforms
Interactivity
Components
Forms
BnEditForm
FormState
Monitors
MenuBar
Horizontal
Vertical
Tabs
BnTab
Icons
Icon Gallery
Buttons
BnButton
Layout
BnStackPanel
BnDrawer
Grid
BnGrid
BnPagedGrid
Navigation
BnNavigator
Carousel
BnCarousel
Charts
BnChart
PDF Viewer
BnPdfViewer
Meet
BnVideoCall

BnButton / BnSubmitButton

Theme-adaptive action buttons with built-in async handling, spinner feedback, disabled/readonly states, and monitor-based validation integration. Use BnButton for general actions and BnSubmitButton to submit a BnEditForm.

Variants

The Variant parameter controls which surface palette drives the button's colour. All variants use the same hover mechanism (rel1) so the hover state is always a natural tint of the base colour — regardless of the containing surface.

Async Click & Spinner

Pass any async Task to Click. The button automatically shows a spinner and disables itself while the task is running, then restores its normal state when it completes. No extra state management needed.

Disabled & ReadOnly

Disabled prevents interaction and dims the button. ReadOnly applies the same visual treatment but does not prevent the HTML element from receiving focus. Both states suppress hover effects.

Custom Content

When ChildContent is provided it replaces the Label string, letting you compose icons, badges, or any markup inside the button.

razor
<BnButton>
    <i class="fa fa-download" />
    Download Report
</BnButton>

BnSubmitButton

BnSubmitButton renders a type="submit" button and integrates with BnEditForm. It shares all parameters with BnButton except Click, and adds FormId to target a specific form element.

razor
<BnEditForm Model="model" OnValidSubmit="HandleSubmit">
    <BnTextBox Label="Name" For="@(() => model.Name)" />
    <BnSubmitButton Label="Submit" />
</BnEditForm>

@* Target a specific form by id *@
<BnSubmitButton Label="Submit" FormId="my-form" />

BnButton Parameters

BnSubmitButton Additional Parameters