Table of Contents

Class ToastOptions

Namespace
BlazOrbit.Components.Layout
Assembly
BlazOrbit.dll

Configuration for a single toast: duration, position, animation, severity.

public sealed class ToastOptions
Inheritance
object
ToastOptions

Constructors

ToastOptions()

public ToastOptions()

Properties

Animation

Enter/exit animation descriptor.

public ToastAnimation Animation { get; init; }

Property Value

ToastAnimation

AutoDismiss

When true, the toast dismisses automatically after Duration.

public bool AutoDismiss { get; init; }

Property Value

bool

Closable

When true, a close button is shown.

public bool Closable { get; init; }

Property Value

bool

CssClass

Extra CSS class applied to the toast root.

public string? CssClass { get; init; }

Property Value

string

Default

Default options (5 s auto-dismiss, top-right, slide-and-fade).

public static ToastOptions Default { get; }

Property Value

ToastOptions

Duration

Auto-dismiss duration when AutoDismiss is enabled.

public TimeSpan Duration { get; init; }

Property Value

TimeSpan

Elevation

Material Design elevation level (0–24) applied to the toast surface. Sets a derived shadow and lifts the surface in dark mode via a tint overlay. null (default) keeps the component-default shadow defined in CSS.

public int? Elevation { get; init; }

Property Value

int?

Long

10 s auto-dismiss preset.

public static ToastOptions Long { get; }

Property Value

ToastOptions

OnClick

Callback fired when the toast body is clicked.

public Action? OnClick { get; init; }

Property Value

Action

OnClose

Callback fired after the toast finishes closing.

public Action? OnClose { get; init; }

Property Value

Action

Persistent

Sticky preset — never auto-dismisses, always closable.

public static ToastOptions Persistent { get; }

Property Value

ToastOptions

Position

Anchor corner where the toast appears.

public ToastPosition Position { get; init; }

Property Value

ToastPosition

Quick

2 s auto-dismiss preset.

public static ToastOptions Quick { get; }

Property Value

ToastOptions

Severity

Drives the ARIA live-region semantics emitted by BOBToast. Error renders as role="alert" aria-live="assertive" (interrupts the screen reader); the others render as role="status" aria-live="polite".

public ToastSeverity Severity { get; init; }

Property Value

ToastSeverity