Swish UI
All componentsBrand and hero Pro

Scripted chat demo

A chat thread plays a short product story, from calendar sync to a paid extra night, on a loop.

The React code for this component comes with Pro.

Unlock with Pro

Use it for

  • A hero that shows the product doing its job
  • Explaining a flow that happens over messages

Avoid

  • Playing it faster than people can read
  • Pretending it is live data: label it as an example

How it works

Every item has a script time in data-t. A segment table stretches the time before human lines by 2.5 so they play slower than system steps, then a single setTimeout chain maps wall clock to script time and toggles an on class on every item whose time has passed, sleeping until the next item is due. An item first opens its space with max-height and margin, then rises out of a light blur. The loop restarts after the last item and stops off screen.

Accessibility

The thread is one image with a text summary, so screen readers hear the story once instead of a stream of changes, and a visible caption says it is illustrative. Reduced motion shows the whole thread at once.

Get the source with Pro

The demo above is free to play with. Pro unlocks the source of this and every other Pro component, with copy-ready code and a zip download.

Already bought? Sign in

Found on