This page as markdown: /text-swap.md · Index for agents: /llms.txt · Everything in one file: /llms-full.txt

TextSwap

Status: stable

A short label changing in place, with blur, slide or fade replacement. One accessible current string; static first paint, immediate updates under subtle/off motion.

Keywords: text replacement, text swap, changing label, status text, blur, crossfade

Usage

Use for short supplied labels that change after an action, such as a schedule's day or an invoice's current state. It presents state; it never invents progress or cycles messages on a timer.

Best practices

Props

Name Type Default Description
text string — The complete current label.
effect "blur" | "slide" | "fade" "blur" The visual replacement; all share the same accessible string.
motion "full" | "subtle" | "off" "full" Only turns motion down. Subtle and off replace the label immediately.

Motion

Accessibility

Related

Examples

Action result

import { Button, TextSwap } from "@sableui/react"

const [saved, setSaved] = useState(false)
<div className="flex items-center gap-3"><Button onClick={() => setSaved(!saved)}>Toggle saved</Button><TextSwap text={saved ? "Saved" : "Unsaved changes"} aria-live="polite" /></div>

Quiet replacement

import { TextSwap } from "@sableui/react"

<TextSwap text="Monday" effect="fade" motion="subtle" />