Component reference
TextShimmer
Text with a light sweep across it, for work in progress.
Preview
TextShimmer has no story of its own; this one draws it as part of SegmentedControl.
Segmented control, active text and confirmation
The segmented control keeps native radio semantics. Confirmation is only used for this local example and introduces no global action gate.
render() {
const mode = signal("comfortable");
const locked = signal(false);
const active = signal(true);
const open = signal(false);
const acknowledged = signal(false);
const feedback = signal("The example has not been removed.");
return (
<Stack align="start">
<SegmentedControl
id="reading-mode"
label="Reading spacing"
value={mode}
disabled={locked}
onValueChange={(next) => {
mode.value = next;
}}
options={[
{ value: "comfortable", label: "Comfortable" },
{ value: "locked", label: "Automatic", disabled: true },
{ value: "compact", label: "Compact" },
]}
/>
<Button
variant="quiet"
onClick={() => {
locked.value = !locked.value;
}}
>
Toggle selection lock
</Button>
<TextShimmer text="Reading the file content" active={active} />
<TextShimmer active={active} className="compound-shimmer">
<TextShimmer text="Checking" />
{" · "}
<TextShimmer text="src/components" />
</TextShimmer>
<Button
variant="quiet"
onClick={() => {
active.value = !active.value;
}}
>
Toggle active state
</Button>
<Button
variant="outline"
onClick={() => {
acknowledged.value = false;
open.value = true;
}}
>
Remove example
</Button>
<RiskConfirmation
id="remove-sample"
open={open}
title="Remove example"
description="This is a local component example; it does not delete real files."
acknowledgeLabel="I understand this action only affects the example."
cancelLabel="Cancel"
confirmLabel="Confirm removal"
acknowledged={acknowledged}
onAcknowledgedChange={(next) => {
acknowledged.value = next;
}}
onCancel={() => {
open.value = false;
}}
onConfirm={() => {
open.value = false;
feedback.value = "Removed the local example.";
}}
/>
<Note role="status">{feedback}</Note>
</Stack>
);
}Installation
bun add meowtail
Usage
Taken from the examples on this page.
import { TextShimmer } from "meowtail";
<TextShimmer text="Checking" />API reference
Nested fragments share the outer sweep; the inert copy is excluded from accessibility.
Props
| Prop | Type | Default |
|---|---|---|
text | MaybeSignal<string> | – |
childrenPresentational fragments only: decoration duplicates them, so omit effects and element IDs. | Child | – |
active | MaybeSignal<boolean> | false |
contentClassName | string | – |
Also takes className, children and the attributes and events of its root element.
DOM parts
rootcontentdecoration
Registry
The component is registered as text-shimmer in the meowtail component registry.