Chat Empty State

The screen before the first message: who is listening, what it knows, and what to ask.

Category
AI Chat
Access
Free with an account
Source
247 lines · one file
States
3 drawn

When to use it

Use Chat Empty State for the first screen of a chat: your logo, a greeting, what the assistant can do and starter prompts. AI Chat shows one through its welcome prop; use this directly when you compose the chat yourself.

Installation

How you get it

Paste this into Claude Code, Cursor, Codex or any coding agent. It installs the file and uses it as it is, instead of writing a new one.

Use Liro's Chat Empty State for this.
Install it: npx shadcn@latest add @liro/chat-empty-state
(the @liro registry is set up in components.json, with LIRO_KEY in .env.local)
Import it from @/components/ui/chat-empty-state.
Do not rewrite or restyle it. Pass my data through its props
and keep its built-in states.

For the full brief with every prop and the mistakes assistants usually make, use Copy prompt above. Free components install through the @liro registry with your CLI token: see the Namespaced tab.

Usage

components/chat-welcome.tsx
import { ChatEmptyState } from "@/components/ui/chat-empty-state";

export function ChatWelcome({ onStart }: { onStart: (prompt: string) => void }) {
  return (
    <ChatEmptyState
      title="How can I help with billing?"
      description="Ask about invoices, plans or failed payments."
      capabilities={[{ title: "Reads your invoices" }, { title: "Drafts reminders" }]}
      starters={[
        { label: "Which invoices are overdue?", tone: "warning" },
        { label: "Summarise this month's revenue", tone: "info" },
      ]}
      onStarter={onStart}
    />
  );
}

API reference

“Copy prompt” above puts a full brief on your clipboard, install command, dependencies, props, and the mistakes an assistant usually makes with this component.

Props

Read from the component’s own TypeScript interface when the site is built, so this table cannot drift from the file you install.

TypeNotes
markReact.ReactNode NoReplaces the default mark: your product's logo, about 48px.
glowboolean NoThe soft glow behind the mark. Default true.
titleReact.ReactNode YesThe greeting. A string is revealed word by word.
descriptionReact.ReactNode No–
capabilitiesChatCapability[] NoUp to four things the assistant can do or reach.
startersArray<string | ChatStarter> NoOne-click questions: strings for chips, objects for cards.
onStarter(text: string) => void NoCalled with the starter's `prompt`, or its label.
childrenReact.ReactNode NoShown in place of `starters`.
footerReact.ReactNode NoA quiet last line: "Answers can be wrong. Check the sources."
align"center" | "start" NoDefault `center`.

Dependencies

npm packages

clsxframer-motionlucide-reacttailwind-merge

Liro foundations, installed alongside it

liro-themebutton

States

All of them are drawn by the component. None is left for you to design.

  • Default
  • With capabilities
  • Custom suggestions

Accessibility

  • Keyboard reachable throughout, in visual order
  • Focus trapped in overlays, Escape closes them
  • Focus returns to whatever opened it
  • Live regions announce what changed, not that something did
  • Honours prefers-reduced-motion

Responsive behavior

  • Sizes to its container, not the viewport
  • Usable from 320px up
  • Pointer-based interaction, so trackpad and touch both work
  • No hover-only affordances