@* Styleguide: every Feedback component (Components/Daisy/Feedback) with its main variants. *@

DAlert

Default alert @foreach (var (color, icon) in alertColors) { @color alert } @foreach (var variant in new[] { DAlertVariant.Soft, DAlertVariant.Outline, DAlertVariant.Dash }) {
@variant @foreach (var (color, _) in alertColors) { @variant @color }
} Vertical, with actions DenyAccept @if (alertDismissed) { Bring the alert back } else {

Responsive, with a heading

Vertical below sm, horizontal above. Dismiss me.
Dismiss
}

DLoading

@foreach (var variant in Enum.GetValues()) { }
@foreach (var size in new[] { DSize.Xs, DSize.Sm, DSize.Md, DSize.Lg, DSize.Xl }) { }
@foreach (var color in colors) { }
Loading in a button

DProgress

−10 +10 @progress%
@for (var i = 0; i < colors.Length; i++) { }

Indeterminate (Value null)

DRadialProgress

@foreach (var value in new[] { 0, 20, 60, 80, 100 }) { }
@foreach (var color in colors) { }

DSkeleton

Loading data, please wait…

DToast

Previews pinned with class="absolute" inside a box

Top start Middle center Bottom end (default) Stacked
@foreach (var horizontal in Enum.GetValues()) { @horizontal }
@foreach (var vertical in Enum.GetValues()) { @vertical }
Show a toast
@foreach (var toast in toasts) { Toast #@toast.Id, gone in 3 s }

DTooltip

@foreach (var placement in Enum.GetValues()) { @placement }
@foreach (var color in colors) { @color }
@foreach (var align in Enum.GetValues()) { @align }
TipContent markup
Hover for markup
@code { static readonly DColor[] colors = { DColor.Neutral, DColor.Primary, DColor.Secondary, DColor.Accent, DColor.Info, DColor.Success, DColor.Warning, DColor.Error }; static readonly (DAlertColor Color, string Icon)[] alertColors = { (DAlertColor.Info, "ion-md-information-circle"), (DAlertColor.Success, "ion-md-checkmark-circle"), (DAlertColor.Warning, "ion-md-warning"), (DAlertColor.Error, "ion-md-close-circle") }; static readonly DAlertColor[] toastColors = { DAlertColor.Info, DAlertColor.Success, DAlertColor.Warning, DAlertColor.Error }; record Toast(int Id, DAlertColor Color); readonly List toasts = new(); DToastHorizontal toastHorizontal; DToastVertical toastVertical; int toastCount; bool alertDismissed; int progress = 40; bool tooltipsOpen; // Blazor renders once the handler yields (toast shown) and again when it completes (toast gone). async Task ShowToast() { var toast = new Toast(++toastCount, toastColors[toastCount % toastColors.Length]); toasts.Add(toast); await Task.Delay(3000); toasts.Remove(toast); } }