Shimmer#

Sweeps a brighter highlight band across text over a base color — a subtle loading/attention effect.

Import#

TSX
import { Shimmer } from '@sigx/terminal';

Usage#

TSX
/** @jsxImportSource @sigx/terminal */
import { component, defineApp, Shimmer } from '@sigx/terminal';

const App = component(() => {
    return () => (
        <box>
            <Shimmer text="Loading…" color="dim" highlight="accent" speed={1} />
        </box>
    );
});

defineApp(<App />).mount({ clearConsole: true });

Props#

PropTypeNotes
textstringrequired — the text
colortoken | #hexbase color
highlighttoken | #hexsweep color
widthnumberwidth of the highlight band
speednumbersweep speed

See also#