All components

Shimmer Input

An input component with a shimmer effect.

Default
Default shimmer input
1import { ShimmerInput } from "@/registry/ui/shimmer-input";
2
3export function ShimmerInputExamples() {
4 return (
5 <div className="flex flex-col gap-4 min-h-64 items-center justify-center">
6 <ShimmerInput
7 placeholder="How can I help you today?"
8 activePlaceholder="Ask me things like: How do I create a new project?"
9 minWidth={240}
10 maxWidth={390}
11 placeholderSpacing={48}
12 aria-label="How can I help you today?"
13 />
14 <ShimmerInput
15 placeholder="How can I help you today?"
16 activePlaceholder="Ask me things like: How do I create a new project?"
17 minWidth={600}
18 maxWidth={800}
19 placeholderSpacing={48}
20 aria-label="How can I help you today?"
21 />
22 </div>
23 );
24}

Installation & source

Install via the shadcn CLI or copy the registry files manually.

bash
npx shadcn@latest add @tt-ui/shimmer-input

Props

NameTypeDefaultDescription
activePlaceholderstringundefinedThe active placeholder of the input
placeholderstringundefinedThe placeholder of the input
collapsedWidthnumberundefinedThe collapsed width of the input
expandedWidthnumberundefinedThe expanded width of the input
containerClassNamestringundefinedThe class name of the container
classNamestringundefinedThe class name of the input
disabledbooleanfalseWhether the input is disabled
valuestringundefinedThe value of the input
defaultValuestringundefinedThe default value of the input
onChange(value: string) => voidundefinedThe callback function when the value changes
onFocus(event: React.FocusEvent<HTMLInputElement>) => voidundefinedThe callback function when the input is focused
onBlur(event: React.FocusEvent<HTMLInputElement>) => voidundefinedThe callback function when the input is blurred
typestringtextThe type of the input
aria-labelstringundefinedThe aria label of the input