Community project. This is not an official government website.

Run by volunteers. Lampung Design System is built by an open source community. No government agency runs or endorses it.

Official services use go.id. Government websites in Indonesia end in .go.id. Never enter your national ID number on a site you are unsure of.

Thinking

Thinking

A dot-grid wave, a shimmering label and an honest elapsed timer, for work of unknown length. When it finishes, the label turns into the result.

Usage

Use it when

  • An assistant or a background job is working and you cannot measure progress: checking a schedule, grading an essay, building a study plan.
  • Work that may take from a few seconds to a minute, where an elapsed timer reassures the person that it has not frozen.
  • A status that should settle into its answer in place ("Found 3 free slots").

Use something else when

  • The work has a measurable size: use Progress bar.
  • A button is running a short action: use Button.
  • Content is loading with a known layout: use Skeleton.
  • A short wait in a row or a list: use Spinner.
  • The answer itself is arriving word by word: use Streaming text.
  • A finished step the assistant took, with details to open: use Tool call.
  • A countdown to a deadline: use Timer.

Where it goes. Where the answer will appear: at the top of the assistant reply in a chat, in the result area of a panel, in the status line of a job. One line, left aligned. Keep it in place after it finishes, as the heading of the result.

Examples

Working, then doneThe wave runs in CSS; data-lds-thinking adds the timer. Press Finish to settle it into the result.
Checking your schedule
<div class="thinking" data-lds-thinking role="status">
  <span class="dotgrid" aria-hidden="true"></span>
  <span class="shimmer">Checking your schedule</span>
  <span class="thinking__time"></span>
</div>
<script type="module">
  import { thinkingDone } from 'lampung-design-system/js';
  // when the work ends:
  thinkingDone(document.querySelector('.thinking'), 'Found 3 free slots');
</script>
Without a timerDrop .thinking__time for waits that are usually short.
Grading your essay
<div class="thinking" data-lds-thinking role="status"><span class="dotgrid" aria-hidden="true"></span><span class="shimmer">Grading your essay</span></div>
SettledAfter thinkingDone the line stays as the heading of the result.
Study plan ready: 6 weeks, 4 sessions a week8.4s
<div class="thinking is-done" role="status"><span class="dotgrid" aria-hidden="true"><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i><i></i></span><span class="shimmer is-settled">Study plan ready: 6 weeks, 4 sessions a week</span><span class="thinking__time">8.4s</span></div>

Anatomy

PartWhat it is
.thinkingRequired. Inline row, 10 px gap, 14 px medium text. role="status".
.dotgridRequired. A 3 x 3 grid of 4 px dots; the JS fills in the nine <i> if empty. aria-hidden="true".
.shimmerRequired. The label; a light band crosses it every 1.8 s.
.thinking__timeOptional elapsed time in tabular mono figures, updated every 100 ms.
.is-doneSettled: the dots stop and turn green, the label stops shimmering and turns strong.

States

StateHow
workingDots wave, label shimmers, time counts.
donethinkingDone(el, label) adds .is-done, settles the shimmer and morphs the label into label (with a success haptic where supported).
failedSettle it yourself with a label that says what failed ("Could not reach the calendar"), then offer a retry next to it.

Motion and microinteractions

  • Dot wave: each dot runs lds-dot-wave (opacity 0.12 to 1 and back) over 1.2 s on --ease-inout, delays stepping 90 ms diagonally (column + row), so a wave travels from the top left corner.
  • Label: .shimmer moves a light band across the text over 1.8 s linear, infinite.
  • Done: the label morphs letter by letter (text morph) and its color settles over --d-standard; dots turn to the success color at once.
  • Reduced motion: the dots stop at 60 % opacity and the shimmer stops; the timer still counts because it is information.

Accessibility

  • role="status" on .thinking, so the label and the final result are announced politely.
  • The dot grid is aria-hidden="true". The timer changes ten times a second; if screen readers read it too often in your context, put aria-hidden="true" on .thinking__time.
  • The settled label must say the result, not only "Done".

Do and don't

Do

  • Name the work in the label ("Checking your schedule").
  • Settle it into the result instead of removing it.
  • Show the elapsed time when the wait may pass five seconds.

Don't

  • Fake progress with a bar for unknown work.
  • Use it for sub-second waits.
  • Change the label every second to look busy.

Behavior and code

Plain HTML. data-lds-thinking on .thinking fills the dot grid and runs the elapsed time (one decimal, "3.4s"). thinkingDone(el, label) settles it and morphs the label. The wave itself is CSS, so markup rendered by any framework moves without the JS.

React. From lampung-design-system/react.

import { Thinking } from 'lampung-design-system/react';

const [started] = useState(() => Date.now());
<Thinking label={done ? 'Found 3 free slots' : 'Checking your schedule'} startedAt={started} done={done} />
// The React timer shows whole seconds as m:ss.