Loader
Busy indicators (dots / pulse / typing / spinner) plus a Shimmer skeleton-text variant for pending assistant content.
Loader
The Loader is a small family of busy visuals shown while a local model warms up or streams its first token. Pick a variant (dots / pulse / typing / spinner), or use Shimmer to render skeleton-text lines for content that is expected but not yet arrived.
Preview
Installation
pnpm dlx shadcn@latest add @localmode/ui/conversation/loadernpx shadcn@latest add @localmode/ui/conversation/loaderyarn dlx shadcn@latest add @localmode/ui/conversation/loaderbunx --bun shadcn@latest add @localmode/ui/conversation/loaderDependencies
- None — pure presentational component
clsx+tailwind-merge— via the sharedcn()util (installed automatically as a registry dependency)
Files installed
loader.tsx—Loader+Shimmerlib/utils.ts— thecn()helper (if not already present)
Props
Loader
Prop
Type
Examples
Typing indicator while pending
import { Loader } from '@/components/loader';
{isStreaming && lastMessage.content === '' && <Loader variant="typing" label="Thinking…" />}Shimmer skeleton
import { Shimmer } from '@/components/loader';
<Shimmer lines={4} />Customization
The dot animation uses an inline @keyframes block so the component is self-contained. Swap the bg-current/bg-muted tokens or the variant set to match your design system.
These primitives are presentational and hook-driven: they render props and emit callbacks, holding only local view state. The orchestration state lives in your app. Every surface uses shadcn/ui CSS-variable utilities, so it inherits your theme — restyle the copied file freely.
Response
A streaming markdown renderer with a cursor that tolerates partial markdown, plus optional typewriter reveal and swappable KaTeX/Mermaid renderers.
Prompt Input
A form-based, auto-resizing chat composer: Enter submits, Shift+Enter newlines, submit/stop swap while streaming, controlled or uncontrolled, with a voice mic and slash-command picker.