ErrorState
Displays an error state with predefined variants for common HTTP status codes
Divergence from Blok
Variant-driven HTTP error copy is a Blazor-side addition. Blok's EmptyStates covers a generic error variant only. We extend the pattern with HTTP-status-code variants (Http400, Http401, Http403, Http404, Http500, Http503) that auto-populate title, description, error code, and matching IllustrationSvg — common needs in martech apps. Override any of Title, Description, ErrorCode, or Illustration as strings to customise per call site. Pass ChildContent for custom action buttons (default is a single "Go to homepage" link).
Examples
Generic
Something went wrong
Please try again. If the issue persists, contact support for assistance.
404 - Page Not Found
Page not found
Error 404
The page you are looking for cannot be found.
401 - Unauthorized
Unauthorized
Error 401
You need to sign in to access this page.
403 - Forbidden
Forbidden
Error 403
You don't have permission to access this page.
500 - Internal Server Error
Internal server error
Error 500
This page isn't working. Please try again later.
503 - Service Unavailable
Service unavailable
Error 503
The service you requested is not available at this time.
400 - Bad Request
Bad request
Error 400
The server could not understand the request. Please check your input and try again.
Custom Override
We couldn't find that
Error 404
The resource you requested has been moved or deleted.
API
The element family below can be composed together. Click an element to jump to its properties.
| Element | Purpose |
|---|---|
| ErrorState | Full-height centred error panel with variant-driven defaults for title, description, error code, and illustration. Each string parameter overrides its variant-derived value independently. |
ErrorState
Full-height centred error panel with variant-driven defaults for title, description, error code, and illustration. Each string parameter overrides its variant-derived value independently.
| Property | Type | Required | Description |
|---|---|---|---|
| Variant | ErrorStateVariant | Preset providing default title, description, error code, and illustration. Default: ErrorStateVariant.Generic. Other values: Http400, Http401, Http403, Http404, Http500, Http503. | |
| Title | string? | Overrides the variant's default title. When null, the variant's preset is used. | |
| Description | string? | Overrides the variant's default description. When null, the variant's preset is used. | |
| ErrorCode | string? | Overrides the variant's default error code. When null, the variant's preset is used (Generic has no code). | |
| Illustration | string? | Raw SVG markup rendered above the title. Overrides the variant's default IllustrationSvg. | |
| OnRetry | EventCallback | Fires when the default "Go to homepage" button is clicked. Only active when ChildContent is not supplied. | |
| ClassName | string? | Extra CSS classes appended to the outer container. | |
| ChildContent | RenderFragment? | Custom action content rendered below the description. When supplied, replaces the default "Go to homepage" link. |