Live, interactive demo of all Noundry.ts components with real data from JSONPlaceholder API
Selected Value:
Select a category to see details
Selected Date:
Selected Range:
Start:
End:
Duration:
Selected User:
|
ID
|
Title
|
Body | User ID |
|---|---|---|---|
|
|
|||
| No results found | |||
Pacer is a top-of-page loading bar (like YouTube or NProgress) that appears at the very top of the browser window during fetch/AJAX calls.
The Pacer creates a fixed canvas element at the top of the page that animates during loading:
Pacer.show() - Show loading bar when fetch startsPacer.progress(0.5) - Update progress (0-1)Pacer.hide() - Hide when fetch completesLook DIRECTLY BELOW the navigation bar!
The blue-purple progress bar appears just under the nav when you click a button.
đĄ Open your browser console (F12) to see confirmation messages when the bar shows/hides.
// Import Pacer
import { Pacer } from './components/ui/Pacer';
// Configure (optional)
Pacer.config({
barThickness: 3,
barColors: {
0: '#3b82f6', // Blue
1: '#8b5cf6' // Purple
}
});
// Use with fetch
async function loadData() {
Pacer.show(); // Show top loading bar
try {
const response = await fetch('/api/data');
const data = await response.json();
Pacer.hide(); // Hide when done
return data;
} catch (error) {
Pacer.hide(); // Hide on error too
throw error;
}
}
For inline progress bars (uploads, downloads, etc.), use standard HTML progress elements: