Demos
For examples and details on the usage of this component, visit the component demo page:
Badge
Properties
| Parameter | Type | Description | Default |
|---|---|---|---|
| ChildContent | RenderFragment |
Gets or sets the content around which the badge is rendered. | - |
| Content | RenderFragment |
Gets or sets the content to render inside the badge. | - |
| Text | object |
Gets or sets the content to display inside the badge. | - |
| Size | Size |
Gets or sets the size of the badge. | Medium |
| Variant | BadgeVariant |
Gets or sets the visual variant of the badge. | Solid |
| Color | ThemeColor |
Gets or sets the color of the badge. | Default |
| Placement | BadgePlacement |
Gets or sets the placement of the badge relative to its anchor element. | TopEnd |
| ShowOutline | bool |
Gets or sets a value indicating whether an outline is shown around the badge. | true |
| Invisible | bool |
Gets or sets a value indicating whether the badge is hidden. | false |
| OneChar | bool |
Gets or sets a value indicating whether the badge content is limited to a single character. If true, the badge will have the same width and height. | false |
| Classes | BadgeSlots |
Gets or sets the CSS class names for the badge slots. | - |
| As | string |
Gets or sets an HTML tag of the component. | - |
| Class | string |
Gets or sets CSS class names that will be applied to the component. | - |
| Style | string |
Gets or sets styles that will be applied to the component. | - |
| AdditionalAttributes | IReadOnlyDictionary<string, object> |
Gets or sets a collection of additional attributes that will be applied to the component. | - |
| ElementReference | ElementReference? |
Gets or sets the associated . May be if accessed before the component is rendered. | - |