fetaUI
GitHub

Request Log

One request in mono, and a windowed list for live tails of any length.

FreeWeb and MobileMotion

Preview

npx shadcn add @fetaui/request-log
Playground
···GET/v1/customerswaiting
States
200POST/v1/charges182 ms
422POST/v1/charges64 ms
503GET/v1/invoices30.0 s
···GET/v1/customerswaiting
20,000 requests, windowed
200POST/v1/charges40 ms
200GET/v1/invoices77 ms
201GET/v1/customers114 ms
200POST/v1/charges151 ms
422GET/v1/invoices188 ms
200GET/v1/customers225 ms
204POST/v1/charges262 ms
503GET/v1/invoices299 ms
200GET/v1/customers336 ms
200POST/v1/charges373 ms
201GET/v1/invoices410 ms
200GET/v1/customers47 ms
422POST/v1/charges84 ms
200GET/v1/invoices121 ms
204GET/v1/customers158 ms
503POST/v1/charges195 ms
200GET/v1/invoices232 ms
200GET/v1/customers269 ms
201POST/v1/charges306 ms
200GET/v1/invoices343 ms
422GET/v1/customers380 ms
200POST/v1/charges417 ms
204GET/v1/invoices54 ms
503GET/v1/customers91 ms
200POST/v1/charges128 ms
200GET/v1/invoices165 ms
201GET/v1/customers202 ms
200POST/v1/charges239 ms
422GET/v1/invoices276 ms
200GET/v1/customers313 ms
204POST/v1/charges350 ms
503GET/v1/invoices387 ms
200GET/v1/customers424 ms
State
Icons animation
Motion

Installation

Terminal· bash
 npx shadcn add @fetaui/request-log

Accessibility

  • The list is a log region that takes focus, so it scrolls from the keyboard.
  • Each dot is labelled, so status is never color alone.

Motion

  • Pending pulses its dot. The pulse shows status, so it keeps running when component motion is off, and pauses offscreen.
  • With reduced motion, the dot is still.

Responsive behavior

  • RequestLogList renders only the rows near the viewport.
  • 640 wide on Web and 358 on Mobile. Mobile drops the time column.

Performance

  • RequestLogList is windowed: at the default height at most 33 rows exist, whatever the length of entries.
  • Scroll is read once per frame, and the window only moves every 8 rows.
  • The Pending dot's loop pauses while it is offscreen.

Note for AI

Give your coding assistant the Markdown reference instead of screenshots.

  • Import RequestLog and RequestLogList from @/components/fetaui/request-log. Use the list for anything long.
  • A RequestEntry needs an id, status, method, path, duration and time. A null status means Pending and shows dots instead of a code.
  • Rows are a fixed 38 px, so duration and time are preformatted strings and height sets the list. A row narrower than 440 px hides time, and below 340 px hides duration, so the path keeps room. The list is a log region named by label.
  • New entries come from you. The demo generates 20,000 static rows and nothing streams.

Related