AI Use Case Tabs
A section-level use-case showcase built with the shared Tabs primitive: each tab (Writing, Coding, Research, Planning, etc.) reveals a different example prompt and a preview of the assistant's response, so visitors can quickly see how the same assistant handles different jobs.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its tabs dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/ai-use-case-tabs.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/chat/chat19.tsx instead.
Usage
The file also exports chat19Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Chat19, chat19Demo } from "@/components/blocks/chat/chat19"; export default function Page() { return <Chat19 {...chat19Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "One assistant, endless use cases" | Section heading. |
| description | string | "See how the same AI assistant adapts to different jobs." | Section subheading. |
| useCases | UseCaseTab[] | none | One entry per tab, each with its own example prompt and response preview. |
| defaultValue | string | undefined | Which tab's `value` is active by default; falls back to the first use case if omitted. |
| className | string | none | Extra classes for the outer section element. |
Types
export interface UseCaseTab { value: string; label: string; prompt: string; response: string; }
Behavior notes
- Stays a plain Server Component: it uses the shared Tabs/TabsList/TabsTrigger/TabsContent primitives uncontrolled via `defaultValue`, the same pattern as booking4, so no client-side state or "use client" directive is needed here.
- Tab switching itself is handled entirely by the underlying Tabs primitive; this block's own code has no interactive event handlers.
- Uses standard px-6 py-16 sm:py-24 marketing-section framing (like the About/Careers blocks) rather than the bounded chat-panel framing used by the other blocks in this category, since it's a section-level showcase, not an in-product chat panel.
More Chat Blocks
View all →rich-prompt-input-with-suggestions
Rich Prompt Input with Smart Suggestions
An AI prompt composer with attachment icons, a model selector, and a grid of clickable prompt suggestion cards.
ai-streaming-response-typewriter
AI Streaming Response with Live Typing
A single AI chat exchange with a skeleton loading state, a word-by-word typewriter reveal, and a stop-generating control.
ai-response-with-cited-sources
AI Response with Cited Sources
A Perplexity-style answer with inline numbered citation markers and an expandable source list below it.
code-generation-chat-with-syntax-highlighting
Code Generation Chat with Syntax Highlighting
A developer chat message with a file-name tab bar, a language badge, illustrative syntax coloring, and a real copy button.
prompt-starter-grid
AI Prompt Starter Grid
A tabbed grid of prompt template cards, filterable by category, each with an icon, title, and description.
ai-agent-profile-card
AI Agent Profile Card
A showcase card for an AI agent with avatar, capability badges, a sample chat preview, stats, and action buttons.