Overview
DaisyButton is a versatile button control that provides DaisyUI styling with support for multiple visual variants, sizes, shapes, and styles including Outline, Soft, and Dash variants.
Properties
Variant
The color variant of the button.Available variants:
Default- Standard button appearanceNeutral- Neutral color schemePrimary- Primary brand colorSecondary- Secondary brand colorAccent- Accent colorGhost- Transparent background with hover effectLink- Link-style button with no backgroundInfo- Information blueSuccess- Success greenWarning- Warning yellow/orangeError- Error red
Size
The size of the button. Controls height, font size, padding, and icon sizing.Available sizes:
ExtraSmallSmallMediumLargeExtraLarge
ButtonStyle
The visual style of the button.Available styles:
Default- Solid filled backgroundOutline- Transparent background with colored borderDash- Dashed border outlineSoft- Semi-transparent filled background
Shape
The shape and layout of the button.Available shapes:
Default- Standard rectangular buttonWide- Extended width (200px minimum)Block- Stretches to fill container widthSquare- Equal width and height (1:1 aspect ratio)Circle- Fully circular button
Icon Properties
Windows Symbol to display as the button icon. Auto-sized based on button Size. Inherits Foreground color.
Path data string (from a 24x24 viewBox) to display as the button icon. Auto-scaled using Viewbox. Inherits Foreground color.
Position of the icon relative to the button content.Options:
LeftRightTopBottom
Neumorphic Properties
Enable or disable neumorphic shadow effect for this button. Overrides global setting.
The neumorphic rendering mode.Options:
None- No neumorphic effectRaised- Elevated appearanceInset- Pressed/sunken appearance
Shadow intensity from 0.0 (subtle) to 1.0 (strong). Values are clamped to this range.
Blur radius for neumorphic shadows.
Offset distance for neumorphic shadows.
Custom color for the dark shadow component.
Custom color for the light shadow component.
Enable rim light effect for neumorphic styling.
Enable surface gradient for neumorphic styling.
Methods
RefreshNeumorphicEffect()
Manually refresh the neumorphic shadow effect. Useful when changing neumorphic properties programmatically.Usage Examples
XAML - Basic Variants
XAML - Sizes
XAML - Shapes
XAML - With Icons
XAML - Button Styles
XAML - Semantic Colors
XAML - Neumorphic Styling
C# - Dynamic Configuration
C# - Programmatic Icon Update
Notes
- Icon Sizing: Icons automatically scale based on the button’s
Sizeproperty - Color Inheritance: Icon colors automatically inherit from the button’s
Foreground - Shape Behavior:
SquareandCircleshapes automatically sync width to heightBlockshape stretches to fill available widthWideshape sets minimum width to 200px
- Link Variant: Has no background or padding by default
- Neumorphic Effects: Require platform-specific support and may fall back to standard shadows on some platforms

