Overview
DaisyCard is a container control with DaisyUI styling, supporting built-in layouts (title, description, icon) and advanced effects like glass morphism with optional backdrop blur.
Properties
Size
The size/scale of the card. Affects padding and font sizing.Available sizes:
ExtraSmallSmallMediumLargeExtraLarge
Variant
The layout variant of the card.Available variants:
Normal- Standard paddingCompact- Reduced padding
ColorVariant
The color theme of the card.Available colors:
Default- Uses Base100 backgroundNeutral,Primary,Secondary,AccentInfo,Success,Warning,ErrorBase200,Base300
CardStyle
The visual style of the card.Available styles:
Default- Flat card with standard border radiusBeveled- Raised appearance with inner highlightsInset- Sunken appearance with inner shadowsPanel- Flat panel with subtle borderGlass- Frosted glass effect
Layout Properties
Padding of the card body. Automatically scales with Size if not set.
Font size of the card body text.
Font size of the card title.
Built-In Content
Built-in title text for the card header.
Built-in description text for the card body.
Image source for the built-in card icon.
Background brush for the built-in icon container.
Border brush for the built-in icon container.
Size of the built-in icon container.
Glass Effect Properties
Whether the card uses a glass effect. Equivalent to setting
CardStyle="Glass".Blur amount for the glass effect.
Opacity of the glass effect background.
Tint color for the glass effect.
Opacity of the glass tint.
Opacity of the glass border.
Opacity of the glass reflection highlight.
Saturation of the glass background (0.0 = grayscale, 1.0 = normal). Only effective with
BlurMode set to BitmapCapture or SkiaSharp.Backdrop Blur
Whether to enable real backdrop blur using Skia (performance intensive). When false, uses simulated glass effect.
The blur rendering mode for glass effect.Options:
Simulated- Fast overlay-based glass effect (no real blur)BitmapCapture- Real backdrop blur via bitmap captureSkiaSharp- Real backdrop blur via Skia rendering
Methods
RefreshBackdrop()
Manually refresh the backdrop blur effect. Call this after the background behind the card has changed.Usage Examples
XAML - Basic Card
XAML - Built-In Layout
XAML - Color Variants
XAML - Card Styles
XAML - Glass Effect
XAML - Sizes and Variants
XAML - Custom Padding
C# - Dynamic Card
C# - Glass Card with Custom Content
C# - Refresh Backdrop on Background Change
Notes
- Glass Performance: Real backdrop blur (
EnableBackdropBlur="True") is performance-intensive. Use simulated glass for better performance. - Built-In vs Custom: You can use built-in properties (
Title,Description,IconImageSource) or provide customContent. - Padding Behavior: When
Variant="Compact", padding scales withSize. SetBodyPaddingexplicitly to override. - Color Auto-Detection: If you set a custom
Backgroundthat matches a palette color, foreground is automatically adjusted. - Backdrop Refresh: Call
RefreshBackdrop()when the background behind a glass card changes to update the blur effect.

