or run

npx @tessl/cli init
Log in

Version

Tile

Overview

Evals

Files

docs

index.mdloading-components.mdstatus-tracking.mdtoast-notifications.md
tile.json

status-tracking.mddocs/

Status Tracking

Comprehensive status display component with progress indicators, queue information, ETA estimates, and timer functionality for monitoring task progress in ML inference and asynchronous operations.

Capabilities

StatusTracker Component

Main component for displaying task status with comprehensive progress tracking, queue position, ETA estimates, and customizable display modes.

/**
 * StatusTracker component for comprehensive status display
 * @param i18n - Internationalization formatter (required)
 * @param eta - Estimated time remaining in seconds
 * @param queue_position - Current position in queue (0-based)
 * @param queue_size - Total size of queue
 * @param status - Current task status
 * @param scroll_to_output - Whether to scroll to output when status changes
 * @param timer - Show elapsed timer
 * @param show_progress - Progress display mode
 * @param message - Optional status message
 * @param progress - Progress data array for multi-step operations
 * @param variant - Display variant (default centers within container, center provides overlay)
 * @param loading_text - Text to display during loading
 * @param absolute - Use absolute positioning
 * @param translucent - Use translucent background
 * @param border - Show border around component
 * @param autoscroll - Enable automatic scrolling to component
 */
export interface StatusTrackerProps {
  i18n: I18nFormatter;
  eta?: number | null;
  queue_position?: number | null;
  queue_size?: number | null;
  status?: "complete" | "pending" | "error" | "generating" | "streaming" | null;
  scroll_to_output?: boolean;
  timer?: boolean;
  show_progress?: "full" | "minimal" | "hidden";
  message?: string | null;
  progress?: LoadingStatus["progress"] | null | undefined;
  variant?: "default" | "center";
  loading_text?: string;
  absolute?: boolean;
  translucent?: boolean;
  border?: boolean;
  autoscroll?: boolean;
}

StatusTracker Events

Events dispatched by the StatusTracker component.

/**
 * Events dispatched by StatusTracker
 */
interface StatusTrackerEvents {
  /** Dispatched when user clicks clear button in error state */
  clear_status: CustomEvent<void>;
}

StatusTracker Slots

Slots available in the StatusTracker component for custom content.

/**
 * Slots available in StatusTracker
 */
interface StatusTrackerSlots {
  /** Additional loading text displayed during loading state */
  "additional-loading-text": {};
  /** Custom error content displayed in error state */
  error: {};
}

Usage Examples:

import { StatusTracker, type LoadingStatus } from "@gradio/statustracker";

// Basic status tracking
<StatusTracker
  i18n={i18n}
  status="pending"
  queue_position={2}
  queue_size={5}
  eta={10}
  timer={true}
  show_progress="full"
/>

// Progress tracking with detailed progress data
const progressData: LoadingStatus["progress"] = [
  {
    progress: 0.5,
    index: 50,
    length: 100,
    unit: "items",
    desc: "Processing data"
  }
];

<StatusTracker
  i18n={i18n}
  status="generating"
  progress={progressData}
  show_progress="full"
  variant="center"
/>

// Minimal status display
<StatusTracker
  i18n={i18n}
  status="pending"
  show_progress="minimal"
  translucent={true}
  timer={false}
/>

// Error state with custom error content
<StatusTracker
  i18n={i18n}
  status="error"
  message="Operation failed"
  on:clear_status={handleClearStatus}
>
  <div slot="error">
    <p>Custom error message here</p>
  </div>
</StatusTracker>

Progress Display Modes

StatusTracker supports three progress display modes:

  • "full": Complete progress display with progress bars, queue information, timers, and ETA
  • "minimal": Simplified display with basic progress indicator and reduced visual elements
  • "hidden": No progress display, component remains invisible

Status States

The component handles different status states with appropriate visual feedback:

  • "pending": Shows progress indicators, queue position, timer, and ETA
  • "generating": Similar to pending but with pulsing animation when show_progress is "full"
  • "streaming": Hidden by default, used for streaming operations
  • "error": Shows error message with clear button
  • "complete": Component becomes hidden
  • null: Component remains hidden

Display Variants

Two display variants are available:

  • "default": Standard positioning within container, shows progress bar and meta text at bottom
  • "center": Overlay positioning with centered content, ideal for modal-like displays

Accessibility Features

StatusTracker includes built-in accessibility features:

  • Proper ARIA labels and roles
  • Screen reader friendly progress announcements
  • Keyboard navigation support for interactive elements
  • High contrast support for visual indicators