Skip to content
PixiKit

Slot Line

A sentence with one slot that cycles through values. The slot's width glides to each new value, so the rest of the line never jumps.

pixikit.com/docs/app-ui/feedback/slot-line

Customize

Interval2200ms
Loops0
Transition
Playing
Default playing
Pause on hover
Pause when hidden
As
Align
Announce

Props

15
NameTypeDefaultDescription
templatestring"Syncing {slot} now."The sentence, with one `{slot}` token where the values go.
itemsSlotItem[]DEFAULT_ITEMSThe values the slot cycles through.
restSlotItemNoneThe value it settles on after `loops` passes, and the only one rendered on the server. Default: the first item.
intervalnumber2200Milliseconds each value stays.
loopsnumber0How many passes through the items before it settles on `rest`; 0 loops forever.
transition"rise" | "fade" | "blur""rise"How a value gives way to the next: it rises, fades or blurs.
playingbooleanNoneWhether it is cycling, when you hold the state.
defaultPlayingbooleantrueWhether it cycles at first, when the line holds the state.
pauseOnHoverbooleantruePauses while the pointer is over the line.
pauseWhenHiddenbooleantruePauses while the tab or the line is out of view.
as"p" | "span" | "h1" | "h2" | "h3""p"The element the sentence is rendered in.
align"start" | "center""start"Where the line sits in its box.
announcebooleanfalseAnnounces each new sentence to screen readers.
onChange(index: number) => voidNoneCalled with the index of the value now shown, or -1 when it settles on `rest`.
classNamestringNone

Related