Svelte UI components for status tracking and user feedback in Gradio applications
—
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Pending
The risk profile of this skill
Animated loading indicators and progress bars for various loading states and streaming operations, providing visual feedback during asynchronous operations.
Animated loading indicator with spring-based animation system featuring geometric shapes that move in a coordinated pattern.
/**
* Animated loader component with spring-based animation
* @param margin - Add margin around the loader (default: true)
*/
export interface LoaderProps {
margin?: boolean; // default: true
}Usage Examples:
import { Loader } from "@gradio/statustracker";
// Basic loader with margin
<Loader />
// Loader without margin (for tight layouts)
<Loader margin={false} />
// Conditional loader display
{#if isLoading}
<Loader margin={true} />
{/if}Animated progress bar for streaming operations with countdown animation that indicates time remaining for the streaming process.
/**
* Streaming progress bar with countdown animation
* @param time_limit - Time limit in seconds for the streaming operation
*/
export interface StreamingBarProps {
time_limit?: number | null;
}Usage Examples:
import { StreamingBar } from "@gradio/statustracker";
// Streaming bar with 30-second time limit
<StreamingBar time_limit={30} />
// Conditional streaming bar (only shows when time_limit is set)
<StreamingBar time_limit={timeRemaining} />
// No streaming bar when time_limit is null
<StreamingBar time_limit={null} />The Loader component features sophisticated spring-based animation:
The StreamingBar provides linear countdown visualization:
These loading components are designed to integrate with the broader Gradio UI system:
// Loader is automatically used by StatusTracker when appropriate
<StatusTracker
status="pending"
show_progress="full"
// Loader appears automatically when no specific progress data is provided
/>// Independent loading states
{#if dataLoading}
<div class="loading-container">
<Loader />
<p>Loading data...</p>
</div>
{/if}
// Streaming indication
<div class="streaming-container">
<StreamingBar time_limit={streamTimeLimit} />
<div class="streaming-content">
<!-- Streaming content here -->
</div>
</div>Both components are optimized for performance:
Loading components include accessibility considerations:
Components integrate with the Gradio design system via CSS custom properties:
This integration ensures consistent theming across light/dark modes and custom theme configurations.