Seven small Blazor controls, from BadgeControl to ProgressBarControl, that tell users what is happening and where they are. Use BadgeControl for counts and status, AlertControl for a message that stays on the page until closed, SkeletonControl while content loads, TimelineControl for the steps of a task or a history, BreadCrumbControl for the path to the current page, and ProgressBarControl or ChunkProgressBarControl for a long import.
Dismiss an alert and the count beside Open alerts drops; Refresh board swaps every row for skeletons while it loads. Each task carries a dot, a square code tag and a status badge.
Example
Razor
C#
Open alerts4
Preview build failed
WEB-117: the order form did not deploy to the preview site.
Waiting on the client
WEB-120 cannot start until Green Fork Cafe picks a payment provider.
Client demo moved
The Sprint 8 demo for Green Fork Cafe is now Thursday at 11:00.
Design approved
Green Fork Cafe signed off on the order email templates for WEB-118.
Complete the next step and the timeline moves on: done steps turn green with a check and a time (PointColor, IconCss, Time), the next one is amber, and each title says done, next or to do, so the state is not shown by color alone. The breadcrumb above shows where the task sits; its last item, the current page, is not a link.
Start the import of Green Fork Cafe's contact lists: a percentage bar with title, status and cancel, and two chunked bars over 0 to 5,000 lines, one horizontal with ten chunks and one vertical with five and no value.
Example
Razor
C#
Importing contact lists· not started
0% ยท file 1 of 3 · 0 of 5,000 lines in all
Documentation
Read from the eight component files and their stylesheets. BadgeControl, AlertControl, SkeletonControl,
TimelineControl and BreadCrumbControl inherit FlexControlBase; its CssClass, Style
and unmatched attributes land on each root element and are listed once, in the last table, together with the base parameters these controls
never read. TimelineItemControl does not inherit it: it has no CssClass or Style, and an attribute it
does not declare is a runtime error. ChunkProgressBarControl inherits it but uses it differently, so its inherited parameters
are in its own table. ProgressBarControl does not inherit it: it declares its own CssClass and Style,
and an attribute it does not declare is a runtime error.
Parameter
Type
Default
Description
Text
string?
null
Content of the span when not empty; ChildContent is then ignored.
ChildContent
RenderFragment?
null
Rendered only when Text is null or empty.
Variant
BadgeVariant
BadgeVariant.Primary
Picks the color class, fx-badge-primary to fx-badge-dark; see the values below. An unknown value falls back to fx-badge-primary.
Size
BadgeSize
BadgeSize.Medium
Picks fx-badge-sm, fx-badge-md or fx-badge-lg: font size and padding.
IsPill
bool
true
Adds fx-badge-pill: fully rounded ends and wider side padding. False keeps the 4px corners of fx-badge. The pill's 0.65em side padding applies at every BadgeSize.
IsDot
bool
false
Adds fx-badge-dot: an 8px circle with no padding. Text and ChildContent are still rendered inside it, so give a dot neither.
Title
string?
null
Inherited from FlexControlBase. Declared, but BadgeControl never reads it, and because it binds to a parameter it is not passed through as a title attribute either: a Title on a dot badge renders nothing, so put its meaning in nearby text.