Skip to content

Surfaces

Card

Bit.BlazorUI

Card is the surface for a single subject. On its own it is a padded box; give it a title, a cover, actions or a footer and it lays those parts out for you, with the cover above, beside, after or behind the content. It comes in three sizes, the whole color palette and a 25-step elevation ramp, and becomes an accessible button, block link or toggle when you need one.

Usage

Every example is live. Open its code to see exactly what produced the component running underneath.

Basic

A padded surface around its ChildContent, only as wide as that content.


bit BlazorUI

bit BlazorUI components are native, easy-to-customize, and ...

Learn more(opens in a new tab)

Dimensions

Width, Height and the MinWidth/MaxWidth/MinHeight/MaxHeight bounds size the card; FullWidth, FullHeight and FullSize stretch it to its container, which keeps a row of cards in a grid one height. ScrollableBody scrolls what outgrows a bounded height - on a card with a header and a footer, only the body between them.


Width, Height and ScrollableBody: this text is long enough to scroll inside the card instead of spilling out of it, so the layout around it stays where it is.

MinWidth and MaxWidth: never narrower than 10rem, never wider than 18rem.


FullSize fills its grid cell.

So a card with more to say makes the whole row taller, and every card in the row follows it.

One height for all.


FullWidth: as wide as its container.

Header

Title and Subtitle make the header, led by IconName (or Icon), or by an image through IconUrl. HeadingLevel (1-6) turns the title into a real heading, so screen reader users can jump from card to card. IconTemplate replaces only the leading icon - an avatar, a logo - while HeaderTemplate replaces the whole header text.


bit BlazorUI
Native Blazor components

A title and a subtitle.

Deployment
Succeeded 2 minutes ago

An icon, and a title that is a level-3 heading.

bit platform
Open source

An image icon, sized like the glyph.

Ada Lovelace
Author

An IconTemplate keeps the title and subtitle.

Ada Lovelace
Author

A HeaderTemplate replaces the icon, title and subtitle.

Actions & Footer

Actions sits at the end of the header, Footer under the body and FloatingActions over the top corner of the card. Their clicks never reach the card itself, and they stay usable on a linked card. Divider draws a hairline between the header, the body and the footer.


Weekly report
Updated an hour ago

Actions beside the title, the footer under the body.

Weekly report
Updated an hour ago

The same card with a Divider.

The star floats over the corner. Starred: False

Cover

ImageUrl puts a full-bleed picture on top, cropped by ImageHeight or by CoverRatio (which stays level as the card narrows) and framed by ImagePosition. It is decorative unless ImageAlt describes it, and ImageLoading can defer it. Cover takes any markup instead, and Reversed moves the cover under the content. CoverOverlay, which lays the cover behind the content, needs a scrim to keep its text readable, so it is shown under CSS variables, where the scrim is introduced.


Mount Rainier
Washington, USA

ImageHeight crops it; ImagePosition keeps the top of the frame.

Widescreen
A 16 / 9 cover

CoverRatio keeps its ratio at any width.

Caption first
A cover under the content

Reversed puts the picture last.

bit BlazorUI
Custom cover
Any markup you like

The Cover template takes the place of the image.

Horizontal

Horizontal puts the cover beside the content, a third of the card wide unless CoverWidth says otherwise; Reversed moves it to the end. The layout mirrors in right-to-left. HorizontalXs to HorizontalXxl change it from their own breakpoint up, the way BitStack's do: the last card keeps its picture above the words below the medium breakpoint (960px) and lays it beside them from there up - resize the window to see it turn.


Mount Rainier
Washington, USA

A thumbnail and a summary on one row.

Mount Rainier
A narrower cover

CoverWidth pins the thumbnail width.

Mount Rainier
A trailing cover

Reversed puts the thumbnail after the words.

Mount Rainier
Beside the words from 960px up

HorizontalMd turns the card at the medium breakpoint.

Click & Selection

OnClick stretches a native button over the card, named by its Title: focusable, pressed by Enter and Space, shaded under the pointer. Actions, Footer and FloatingActions stay separate controls above it. Binding Selected makes it a toggle (aria-pressed and a ring). Disabled disables it; StopPropagation keeps the click from its ancestors.


Clickable

Clicked 0 times.

Disabled

Answers nothing.

Backups
$4 / month

Selected: True

Monitoring
$6 / month

Selected: False

Link

Href stretches a link over the card, named by its Title and described by its Subtitle (or named by an AriaLabel). Controls in Actions, Footer and FloatingActions stay above it. Target, Rel and Download reach the link; _blank adds noopener to the rel, unless Rel already says NoOpener, NoReferrer or Opener - Opener is the one way to hand the new tab its opener back.


bit BlazorUI
blazorui.bitplatform.dev

The whole card is the link; the pin is not. Pinned: False

Loading

Loading swaps the body for a placeholder and marks the card aria-busy; the header stays. LoadingTemplate brings a placeholder of your own.



Weekly report
Updated an hour ago
Custom placeholder

Elevation & Hover

Elevation picks a level of the theme's shadow ramp (0-24) and rises from it on hover. NoShadow flattens the card, and Hoverable gives a card that is not clickable the hover shadow under the pointer.



Elevation
Level 4
NoShadow
A flat surface
Hoverable
Hover me

Appearance

Outlined trades the shadow for a border, and Border draws one in the color you pick. Background picks the surface color, Square drops the corner radius and NoPadding removes the inset.


Outlined
Border
Tertiary, no shadow
Square

NoPadding: the content touches the edges.


Primary
Secondary
The default
Tertiary
Transparent

Accessibility

Wrap a run of cards in a named list and give their titles a HeadingLevel. A linked or clickable card is then read as its title, described by its subtitle, with its actions as separate controls. An AriaLabel gives a plain card the group role; a splatted option, tab or row role makes the card itself the control and reports aria-selected, while a structural one such as listitem keeps the stretched button. Loading sets aria-busy. Focus rings are drawn inside the card, and forced-colors mode restores its border.


  • Theming
    5 min read

    Tokens, presets and dark mode.

  • Iconography
    3 min read

    Built-in and external icons.

  • Release notes

CSS variables

The public --bit-Card-* variables (see the CSS variables table) restyle every card at once. They inherit, so set them on :root, on any ancestor - a plain element, as here - or on one card's Style. A parameter set on the card still wins, and a disabled card keeps the disabled colors. Hover the first row: --bit-Card-hover-border-color darkens the rule and --bit-Card-hover-lift raises the card, while the Border of the last one keeps its color.


Soft
Flat, outlined, lifts on hover
Same look
From the same ancestor
Border wins
A parameter beats the variable

Brand
Custom colors

A body under a divider.

A footer
Selectable
Amber ring, indigo hover

Olympic National Park
Washington, USA

A CoverOverlay card, read against the scrim set on its own Style.

Cascading parameters

BitParams hands a BitCardParams to every card under it, so a grid sets its shared look once. It is a default, not an override: the last card keeps its own Size.


Inbox
12 unread

Outlined, small, divided.

Calendar
3 events today

The same, from BitParams.

Tasks
5 due

Keeps its own Size.

Element

Element renders the card as another tag: an article for a card that stands on its own, a section for one part of a page, an aside for content beside the main flow, a nav for a card of links. A card rendered as one of those four is titled by its Title through aria-labelledby, which is what makes a section a region of the page; an AriaLabel names it instead.


Release notes
Posted today

An article: a post that stands on its own.

Getting started

A section, named by its title.

Accent

Accent draws a bar in a theme role along the inline-start edge of the card, the look of a callout. The bar is laid over that edge, so it moves nothing inside the card, covers the start side of an outlined card's rule, follows its corners, runs over a cover and moves to the right in right-to-left. Taking no room, it also covers the first few pixels of the content of a card with NoPadding. It goes along with every other look of the card, steps inside the selection and focus rings, and a disabled card dims it.


Primary
The callout look

A note set apart from the cards around it.

Success
On an outlined card
Warning
On a square card
Error
Disabled

Mount Rainier
Over a cover

The bar runs over the edge of the thumbnail.


--bit-Card-accent-color draws the bar on its own, in any color, on every card it reaches - an Accent on the card still wins over it. --bit-Card-accent-width sets how thick the bar is, and draws nothing on its own.

Any color
From the variable alone
Accent wins
Over the variable

Color

Color paints the card in a theme role and Variant decides how: Fill (the default) paints the surface, Outline the border and the text, Text tints the surface. A disabled card uses the role's disabled colors.


Primary
Fill
Primary
Outline
Primary
Text

Secondary
Fill
Secondary
Outline
Secondary
Text

Tertiary
Fill
Tertiary
Outline
Tertiary
Text

Info
Fill
Info
Outline
Info
Text

Success
Fill
Success
Outline
Success
Text

Warning
Fill
Warning
Outline
Warning
Text

SevereWarning
Fill
SevereWarning
Outline
SevereWarning
Text

Error
Fill
Error
Outline
Error
Text

PrimaryBackground
SecondaryBackground
TertiaryBackground

PrimaryForeground
SecondaryForeground
TertiaryForeground

PrimaryBorder
SecondaryBorder
TertiaryBorder

Disabled:

Primary
Fill
Success
Outline
Error
Text

External Icons

Icon takes a BitIconInfo from an external library such as FontAwesome or Bootstrap Icons; the glyph is sized to the title beside it.


FontAwesome:

House
fa-solid fa-house
GitHub
fa-brands fa-github
Rocket
fa-solid fa-rocket

Bootstrap:

House
bi bi-house-fill
GitHub
bi bi-github
Gear
bi bi-gear-fill

Size

Size scales the padding, the gaps and the header type together. Medium is the default.


Small
A tight card

Small padding, small type.

Medium
The default

Medium padding, medium type.

Large
A roomy card

Large padding, large type.

Style & Class

Style and Class land on the root; Styles and Classes reach each part - the link, the floating actions, the cover and its image, the main column, the header with its icon, text, title and subtitle, the actions, the body, the footer and the selected state.


Styled card

Classed card


Styles
Per-part inline styles

Every part can be styled on its own.

Classes
Per-part CSS classes

And every part can take a class.

RTL

Use Dir="BitDir.Rtl" to mirror the whole card: the icon, the actions and a horizontal cover all swap sides.


کارت
یک زیرعنوان

بیت بلیزور یو آی، کامپوننت‌های بومی، قابل تنظیم و ...

CSS variables

The public custom properties this component reads off its root, for what no parameter covers.

Every variable is read with a fallback and never declared by the component, so it inherits like any other custom property: set one on :root (or in a [bit-theme] block) to restyle every instance, on any ancestor to restyle the ones inside it, or on the Style of one instance to restyle it - and any instance nested inside it, which inherits the value too; a parameter changes one alone, as does the real CSS property on the instance's Style / Styles when that property does not inherit (opacity: 1 keeps one disabled instance undimmed without undimming a disabled one inside it), while an inherited one such as color or font-family also reaches the nested instances that do not set it themselves. Leave a variable unset and the component falls back to the theme token beside it.

BitCard CSS variables

Name Default value Description
--bit-Card-color --bit-clr-fg-pri Text color. A Color on the card wins over it.
--bit-Card-background --bit-clr-bg-sec Background. A Background or a Color on the card wins over it.
--bit-Card-border-color --bit-clr-brd-pri Border color, on every card that draws a border. A Border or a Color on the card wins over it.
--bit-Card-border-width 0; --bit-shp-brd-width on an Outlined card or one given a Border Border width. Set on its own it draws a border around every card.
--bit-Card-accent-color none (no bar) Color of the bar along the inline-start edge. Set on its own it draws that bar, on every card it reaches. An Accent on the card wins over it.
--bit-Card-accent-width 2 × --bit-shp-brd-width-thick Width of that bar. It draws nothing on its own: the bar needs an Accent or --bit-Card-accent-color.
--bit-Card-radius --bit-shp-radius-surface Corner radius. Square wins over it.
--bit-Card-shadow --bit-shd-card Resting shadow. Elevation, NoShadow and Outlined win over it.
--bit-Card-hover-shadow --bit-shd-card-hover Shadow of a clickable, linked or Hoverable card under the pointer. An Elevation wins over it.
--bit-Card-active-shadow The resting shadow Shadow of a clickable or linked card while pressed.
--bit-Card-hover-background The resting background washed 5% with the text color Background of a clickable or linked card under the pointer. A Fill card uses its role's hover shade instead.
--bit-Card-active-background The resting background washed 10% with the text color Background of a clickable or linked card while pressed. A Fill card uses its role's pressed shade instead.
--bit-Card-hover-border-color The resting border color Border color of a clickable, linked or Hoverable card under the pointer, on a card that draws a border. A Border or a Color on the card wins over it.
--bit-Card-hover-lift none How far a clickable, linked or Hoverable card rises under the pointer, as a length: 2px lifts it by 2px, and a value below 0 lifts nothing. The card keeps the room it left hovered and stays lifted while pressed, so the pointer never slips off it. Under reduced motion it steps there instead of gliding.
--bit-Card-padding --bit-spa-card-md Inset of the card and of each of its parts. The Size and NoPadding parameters win over it.
--bit-Card-gap spacing(1.5) Room between the parts, and between the header icon, text and actions. The Size parameter wins over it.
--bit-Card-title-font-size --bit-tpg-fs-md Title text size. The Size parameter wins over it.
--bit-Card-title-font-weight --bit-tg-fw-semibold Title text weight.
--bit-Card-subtitle-font-size --bit-tpg-fs-sm Subtitle text size. The Size parameter wins over it.
--bit-Card-subtitle-color --bit-clr-fg-sec Subtitle color. A card painted by a Color, or disabled, gives the subtitle its own text color instead.
--bit-Card-icon-size --bit-siz-icon-md Size of the header icon, the glyph and the IconUrl image alike. The Size parameter wins over it.
--bit-Card-disabled-icon-opacity --bit-opa-dis Opacity of the IconUrl image of a disabled card, which keeps its own colors and so is faded instead.
--bit-Card-divider-color --bit-clr-brd-sec Color of the Divider hairlines.
--bit-Card-selected-color --bit-clr-pri Color of the Selected ring. A Fill card draws it in its own text color instead.
--bit-Card-focus-color The text color Color of the keyboard focus ring, on the card and on the link of a linked card.
--bit-Card-cover-width 33% Width of the cover of a Horizontal card. CoverWidth wins over it.
--bit-Card-scrim none A layer painted over a CoverOverlay picture and under the content, such as a dark gradient, so the text over it stays readable.
--bit-Card-skeleton-background The text color at 10% Resting color of the bars of the default placeholder of a loading card.
--bit-Card-skeleton-color The text color at 20% Color of the wave that sweeps across those bars.

API

Every parameter, public member, sub-class and enum this component exposes.

BitCard parameters

Name Type Default value Description
Accent BitColor? null Draws a bar in a theme role along the inline-start edge of the card, the look of a callout. It is laid over the edge, so it moves nothing inside the card (and covers the first few pixels of a NoPadding card's content), lies over the start side of an Outlined card's rule, and goes along with Color, Variant, Outlined and Border. Unset, the card draws the bar only where --bit-Card-accent-color is set.
Actions RenderFragment? null Content at the end of the header, for what acts on the whole card (a menu, a dismiss button). Its clicks never reach the card, and it stays above the link of a linked card.
Background BitColorKind? null The neutral surface color of the card. Unset, the card reads --bit-Card-background, then the theme's secondary background.
Border BitColorKind? null Draws a border in one of the neutral border colors. Wins over the color Outlined asks for.
ChildContent RenderFragment? null The content of the card: the whole padded box on a plain card, the body on one with a cover, a header or a footer.
Classes BitCardClassStyles? null Custom CSS classes for different parts of the card.
Color BitColor? null Paints the card in a theme role, the way the Variant asks for. Unset, the card stays a neutral surface.
Cover RenderFragment? null Full-bleed media at the top of the card (a chart, a carousel, a video), clipped to its corners. Takes precedence over ImageUrl.
CoverOverlay bool false Lays the cover behind the content, filling the card. Give the card a Height or MinHeight, and a --bit-Card-scrim so its text stays readable.
CoverRatio string? null The aspect ratio of the cover, as a CSS ratio such as 16 / 9. Keeps a row of cards level at any width.
CoverWidth string? null The width of the cover of a horizontal card - through Horizontal or at the widths HorizontalXs to HorizontalXxl make it so. Unset, it reads --bit-Card-cover-width, then a third of the card.
Divider bool false Draws a hairline between the header, the body and the footer - only between parts, never on the outer edge.
Download string? null The download attribute of the link of a card that has an Href.
Element string? null The custom html element used for the root node, a div by default - an article, a section, an aside or a nav is what tells assistive technologies which part of the page the card is. A card rendered as one of those four is titled by its Title through aria-labelledby, unless an AriaLabel, an aria-label or aria-labelledby of the page's own, a splatted role, a HeaderTemplate, an Href or an OnClick names it some other way. A name that is not one a tag can have, a void element, or a tag that cannot hold the content of a card (an a, a button, a p, a heading, a list, a table, a template, ...) falls back to the default.
Elevation int? null A level of the theme's shadow ramp (0-24, --bit-shd-0 to --bit-shd-24) the card rests at and rises from on hover. 0 is flat.
FloatingActions RenderFragment? null Content floated over the top corner of the card, above everything else - a favorite toggle or a selection box on a picture card. Its clicks never reach the card.
Footer RenderFragment? null Content under the body, for the actions a reader takes. Its clicks never reach the card, and it stays above the link of a linked card.
FullHeight bool false Makes the card height 100% of its parent container.
FullSize bool false Makes the card width and height 100% of its parent container.
FullWidth bool false Makes the card width 100% of its parent container.
HeaderTemplate RenderFragment? null Replaces the icon, the title and the subtitle; Actions still renders beside it. A linked or clickable card with one is named by its body; an AriaLabel says it shorter.
HeadingLevel int? null Makes the title a heading of this level (1-6). Ignored under a splatted role that presents its children, such as option or tab.
Height string? null Sets the height of the card explicitly.
Horizontal bool false Lays the cover beside the content instead of above it. HorizontalXs to HorizontalXxl replace it from their own breakpoint upwards, and a BitParams supplies none of them to a card that set this itself. A card horizontal at every width carries the bit-crd-hrz class; one whose orientation changes with the width carries a bit-crd-hrz-xs to bit-crd-hrz-xxl class per band it is horizontal in instead, and no bit-crd-hrz.
HorizontalLg bool? null Gets or sets the orientation of the card from the large breakpoint (from 1280px) upwards: true lays the cover beside the content and false above it. The value keeps applying to every wider breakpoint until another one replaces it.
HorizontalMd bool? null Gets or sets the orientation of the card from the medium breakpoint (from 960px) upwards: true lays the cover beside the content and false above it. The value keeps applying to every wider breakpoint until another one replaces it.
HorizontalSm bool? null Gets or sets the orientation of the card from the small breakpoint (from 600px) upwards: true lays the cover beside the content and false above it. The value keeps applying to every wider breakpoint until another one replaces it.
HorizontalXl bool? null Gets or sets the orientation of the card from the extra large breakpoint (from 1920px) upwards: true lays the cover beside the content and false above it. The value keeps applying to every wider breakpoint until another one replaces it.
HorizontalXs bool? null Gets or sets the orientation of the card from the extra small breakpoint (from 0px) upwards: true lays the cover beside the content and false above it. The value keeps applying to every wider breakpoint until another one replaces it, and Horizontal is the base of that chain. CoverWidth, Reversed and the rest of the horizontal layout follow the orientation each breakpoint gives.
HorizontalXxl bool? null Gets or sets the orientation of the card from the extra extra large breakpoint (from 2560px) upwards: true lays the cover beside the content and false above it.
Hoverable bool false Gives a card that is not a control the hover shadow under the pointer, and the hover border color and lift when --bit-Card-hover-border-color and --bit-Card-hover-lift set them. A clickable or linked card gets them on its own.
Href string? null Stretches a link to this URL over the whole card, named by the AriaLabel, an aria-labelledby, the Title, the Subtitle (which describes a link the Title names) or the body, or else by all the card says. Actions, Footer and FloatingActions stay above it; the rest of the card is under it.
Icon BitIconInfo? null The header icon from an external library. Takes precedence over IconName.
IconName string? null The name of the header icon from the built-in Fluent UI icons.
IconTemplate RenderFragment? null Replaces only the header icon (an avatar, a logo) and keeps the Title and the Subtitle beside it.
IconUrl string? null The url of a custom image rendered as the header icon, sized like the glyph, used when neither IconTemplate, Icon nor IconName is set.
ImageAlt string? null The alternate text of the cover image. Unset, the image is decorative (an empty alt) and skipped by screen readers.
ImageHeight string? null The height of the cover image, which is cropped to fill it rather than stretched.
ImageLoading BitImageLoading? null The loading behavior of the cover image, eager or lazy.
ImagePosition string? null Which part of a cropped cover image stays in frame, as a CSS object-position such as top or 50% 20%.
ImageUrl string? null The URL of the cover image at the top of the card.
Loading bool false Swaps the body for a placeholder and marks the card aria-busy. The header keeps rendering.
LoadingTemplate RenderFragment? null A custom placeholder for the body while Loading is set.
MaxHeight string? null Sets the maximum height of the card.
MaxWidth string? null Sets the maximum width of the card.
MinHeight string? null Sets the minimum height of the card.
MinWidth string? null Sets the minimum width of the card.
NoPadding bool false Removes the inset of the card and of all its parts.
NoShadow bool false Removes the resting shadow. The card still takes the hover shadow when it is clickable, linked or Hoverable.
OnClick EventCallback<MouseEventArgs> Stretches a native button over the card, named like the link of Href, so the title stays a heading and Actions, Footer and FloatingActions stay separate controls. The button lets the pointer through, so the body still scrolls and its controls still answer the pointer. Under a splatted widget role (option, tab, row) the card itself is the control; a structural one (listitem, article) keeps the button.
Outlined bool false Trades the shadow for a border. An explicit Border still decides its color.
Rel BitLinkRels? null The rel attribute of the link of a card that has an Href. A Target of _blank adds noopener, unless the rel already says NoOpener, NoReferrer or Opener.
Reversed bool false Puts the cover after the content: under the body, or at the end of a Horizontal card.
ScrollableBody bool false Scrolls content that outgrows a bounded height; on a card with a header and a footer only the body scrolls.
Selected bool false Draws the selection ring. Binding it makes the card a toggle whose button reports aria-pressed, or aria-selected under a splatted option, row, gridcell, tab or treeitem role, or aria-checked under a splatted checkbox, switch or radio role.
Size BitSize? null Scales the padding, the gaps and the header type together. An explicit value wins over the --bit-Card-* size variables; left unset, the card is medium unless they say otherwise.
Square bool false Removes the corner radius.
StopPropagation bool false Stops the click of the card from reaching its ancestors.
Styles BitCardClassStyles? null Custom CSS styles for different parts of the card.
Subtitle string? null The second line of the header, under the title.
Target string? null The target attribute of the link of a card that has an Href.
Title string? null The first line of the header. It also names the link of a linked card.
Variant BitVariant? null How a Color is applied: Fill (the default) paints the surface, Outline the border, Text tints the surface; the last two write in the role's readable foreground shade. Ignored without a Color.
Width string? null Sets the width of the card explicitly.

BitCard public members

Name Type Default value Description
FocusAsync ValueTask Focuses the card: the stretched link or button of a linked or clickable card, or else the root of one given a role or a TabIndex.

BitComponentBase parameters

Name Type Default value Description
AriaLabel string? null Gets or sets the accessible label for the component, used by assistive technologies.
Class string? null Gets or sets the CSS class name(s) to apply to the rendered element.
Dir BitDir? null Gets or sets the text directionality for the component's content.
Disabled bool false Gets or sets a value indicating whether the component is disabled and cannot respond to user interaction.
ForceAnimation bool false Gets or sets a value indicating whether the component's animations play at their full duration even when reduced motion is requested.
HtmlAttributes Dictionary<string, object> new Dictionary<string, object>() Captures additional HTML attributes to be applied to the rendered element, in addition to the component's parameters. An attribute written on the component wins over an entry of the same name.
Id string? null Gets or sets the unique identifier for the component's root element.
Style string? null Gets or sets the CSS style string to apply to the rendered element.
TabIndex string? null Gets or sets the tab order index for the component when navigating with the keyboard.
Visibility BitVisibility BitVisibility.Visible Gets or sets the visibility state (visible, hidden, or collapsed) of the component.

BitComponentBase public members

Name Type Default value Description
UniqueId Guid Guid.NewGuid() Gets the readonly unique identifier for the component's root element, assigned when the component instance is constructed.
RootElement ElementReference Gets the reference to the root HTML element associated with this component.

BitCardClassStyles properties

Name Type Default value Description
Root string? null Custom CSS classes/styles for the root element of the BitCard.
Link string? null Custom CSS classes/styles for the stretched link (Href) or button (OnClick) that covers the card.
FloatingActions string? null Custom CSS classes/styles for the slot floated over the corner of the BitCard.
Cover string? null Custom CSS classes/styles for the full-bleed media area at the head of the BitCard.
Image string? null Custom CSS classes/styles for the image rendered from the ImageUrl of the BitCard.
Main string? null Custom CSS classes/styles for the element that holds the header, the body and the footer of the BitCard.
Header string? null Custom CSS classes/styles for the header of the BitCard.
Icon string? null Custom CSS classes/styles for the leading icon of the header of the BitCard (the glyph, or the image rendered for IconUrl).
HeaderText string? null Custom CSS classes/styles for the element that holds the title and the subtitle of the BitCard.
Title string? null Custom CSS classes/styles for the title of the BitCard.
Subtitle string? null Custom CSS classes/styles for the subtitle of the BitCard.
Actions string? null Custom CSS classes/styles for the actions rendered at the trailing edge of the header of the BitCard.
Body string? null Custom CSS classes/styles for the body of the BitCard, which is what the ChildContent renders into.
Skeleton string? null Custom CSS classes/styles for the default placeholder of a loading BitCard, drawn when no LoadingTemplate is set.
SkeletonBar string? null Custom CSS classes/styles for each bar of the default placeholder of a loading BitCard.
Footer string? null Custom CSS classes/styles for the footer of the BitCard.
Selected string? null Custom CSS classes/styles for the root element of the BitCard while it is selected.

BitIconInfo properties

Name Type Default value Description
Name string? null Gets or sets the name of the icon.
BaseClass string? null Gets or sets the base CSS class for the icon. For built-in Fluent UI icons, this defaults to "bit-icon". For external icon libraries like FontAwesome, you might set this to "fa" or leave empty.
Prefix string? null Gets or sets the CSS class prefix used before the icon name. For built-in Fluent UI icons, this defaults to "bit-icon--". For external icon libraries, you might set this to "fa-" or leave empty.

BitColorKind enum

Name Value Description
Primary 0 The primary color kind.
Secondary 1 The secondary color kind.
Tertiary 2 The tertiary color kind.
Transparent 3 The transparent color kind.

BitColor enum

Name Value Description
Primary 0 Primary general color.
Secondary 1 Secondary general color.
Tertiary 2 Tertiary general color.
Info 3 Info general color.
Success 4 Success general color.
Warning 5 Warning general color.
SevereWarning 6 SevereWarning general color.
Error 7 Error general color.
PrimaryBackground 8 Primary background color.
SecondaryBackground 9 Secondary background color.
TertiaryBackground 10 Tertiary background color.
PrimaryForeground 11 Primary foreground color.
SecondaryForeground 12 Secondary foreground color.
TertiaryForeground 13 Tertiary foreground color.
PrimaryBorder 14 Primary border color.
SecondaryBorder 15 Secondary border color.
TertiaryBorder 16 Tertiary border color.

BitImageLoading enum

Name Value Description
Eager 0 Tells the browser to load the image or the embedded page as soon as the element is processed, which is what a browser does with an img or an iframe that has no loading attribute.
Lazy 1 Tells the user agent to hold off on loading the image or the embedded page until the browser estimates that it will be needed imminently.

BitSize enum

Name Value Description
Small 0 The small size.
Medium 1 The medium size.
Large 2 The large size.

BitVariant enum

Name Value Description
Fill 0 Fill styled variant.
Outline 1 Outline styled variant.
Text 2 Text styled variant.

BitVisibility enum

Name Value Description
Visible 0 The content of the component is visible.
Hidden 1 The content of the component is hidden, but the space it takes on the page remains (visibility:hidden).
Collapsed 2 The component is hidden (display:none).

BitDir enum

Name Value Description
Ltr 0 Ltr (left to right) is to be used for languages that are written from the left to the right (like English).
Rtl 1 Rtl (right to left) is to be used for languages that are written from the right to the left (like Arabic).
Auto 2 Auto lets the user agent decide. It uses a basic algorithm as it parses the characters inside the element until it finds a character with a strong directionality, then applies that directionality to the whole element.

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.