Status | jaspr_daisyui_components
jaspr_daisyui_components
pub.dev ↗

Status

Status is a really small icon to visually show the current status of an element, like online, offline, error, etc.

Class name Type Description
status Component Status icon
status-neutral Color neutral color
status-primary Color primary color
status-secondary Color secondary color
status-accent Color accent color
status-info Color info color
status-success Color success color
status-warning Color warning color
status-error Color error color
status-xs Size extra small size
status-sm Size small size
status-md Size medium size
status-lg Size large size
status-xl Size extra large size

Status

<span class="status"></span>
span(const [], classes: 'status');

Status sizes

<div aria-label="status" class="status status-xs"></div>
<div aria-label="status" class="status status-sm"></div>
<div aria-label="status" class="status status-md"></div>
<div aria-label="status" class="status status-lg"></div>
<div aria-label="status" class="status status-xl"></div>
Component.fragment([
  Status(const [], size: StatusSize.xs, attributes: {'aria-label': 'status'}),
  Status(const [], size: StatusSize.sm, attributes: {'aria-label': 'status'}),
  Status(const [], size: StatusSize.md, attributes: {'aria-label': 'status'}),
  Status(const [], size: StatusSize.lg, attributes: {'aria-label': 'status'}),
  Status(const [], size: StatusSize.xl, attributes: {'aria-label': 'status'}),
]);

Status with colors

<div aria-label="status" class="status status-primary"></div>
<div aria-label="status" class="status status-secondary"></div>
<div aria-label="status" class="status status-accent"></div>
<div aria-label="status" class="status status-neutral"></div>
<div aria-label="info" class="status status-info"></div>
<div aria-label="success" class="status status-success"></div>
<div aria-label="warning" class="status status-warning"></div>
<div aria-label="error" class="status status-error"></div>
Component.fragment([
  Status(const [], color: StatusColor.primary, attributes: {'aria-label': 'status'}),
  Status(const [], color: StatusColor.secondary, attributes: {'aria-label': 'status'}),
  Status(const [], color: StatusColor.accent, attributes: {'aria-label': 'status'}),
  Status(const [], color: StatusColor.neutral, attributes: {'aria-label': 'status'}),
  Status(const [], color: StatusColor.info, attributes: {'aria-label': 'info'}),
  Status(const [], color: StatusColor.success, attributes: {'aria-label': 'success'}),
  Status(const [], color: StatusColor.warning, attributes: {'aria-label': 'warning'}),
  Status(const [], color: StatusColor.error, attributes: {'aria-label': 'error'}),
]);

Status with ping animation

Server is down
<div class="inline-grid *:[grid-area:1/1]">
  <div class="status status-error animate-ping"></div>
  <div class="status status-error"></div>
</div>
Server is down
Component.fragment([
  div(
    [
      Status(const [], classes: 'animate-ping', color: StatusColor.error),
      Status(const [], color: StatusColor.error),
    ],
    classes: 'inline-grid *:[grid-area:1/1]',
  ),
  Component.text('Server is down'),
]);

Status with bounce animation

Unread messages
<div class="status status-info animate-bounce"></div>
Unread messages
Component.fragment([
  Status(const [], classes: 'animate-bounce', color: StatusColor.info),
  Component.text('Unread messages'),
]);