Skip to content

NotificationCardWidget ​

Namespace: Hex1b.Widgets

Assembly: Hex1b.dll

A notification card widget that displays a single notification with title, body, and action buttons.

csharp
public sealed record NotificationCardWidget : Hex1bWidget, IEquatable<Hex1bWidget>, IEquatable<NotificationCardWidget>

Inheritance ​

Object → Hex1bWidget → NotificationCardWidget

Implements ​

Constructors ​

NotificationCardWidget(Notification, NotificationStack) ​

Creates a notification card for the specified notification.

Parameters:

csharp
public NotificationCardWidget(Notification notification, NotificationStack stack)

Properties ​

Notification ​

The notification to display in this card.

Returns: Notification

csharp
public Notification Notification { get; }

ShowProgressBar ​

Whether to show the timeout progress bar. Defaults to true.

Returns: Boolean

csharp
public bool ShowProgressBar { get; init; }

Fields ​

DismissAction ​

Returns: ActionId

csharp
public static readonly ActionId DismissAction

Remarks ​

Notification cards are the visual representation of a . They are automatically created by - you typically don't create them directly.

Card layout:

csharp
┌────────────────────────────────────┐
│ Title                          × ▼ │
│ Body text (if present)             │
│  Primary ▼                         │
│ ▓▓▓▓▓▓▓▓▓░░░░░ (timeout progress) │
└────────────────────────────────────┘

Features: Dismiss button (×) removes the notification entirely.Primary action button with optional dropdown for secondary actions.Progress bar showing time until auto-hide (for floating cards only).

Released under the MIT License.