AI Prompt Hero with Stats
A landing-page hero for an AI product: heading, description, a prominent prompt input with a Generate button, a row of trust stat tiles (prompts run, active users, response time, uptime), and a grid of popular prompt example cards below.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its button dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/ai-prompt-hero-with-stats.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/chat/chat18.tsx instead.
Usage
The file also exports chat18Demo, 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 { Chat18, chat18Demo } from "@/components/blocks/chat/chat18"; export default function Page() { return <Chat18 {...chat18Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "The fastest way to get AI answers" | Hero heading. |
| description | string | "Type a prompt below and get a well-crafted response..." | Hero subheading. |
| stats | HeroStat[] | none | Trust stat tiles shown below the prompt input. |
| popularPrompts | PopularPrompt[] | none | Grid of popular prompt example cards. |
| className | string | none | Extra classes for the outer section element. |
Types
export interface HeroStat { label: string; value: string; } export interface PopularPrompt { id: string; title: string; }
Behavior notes
- Fully static Server Component: the prompt input and Generate button are plain, uncontrolled markup with no onSubmit handler and no client state, per this repo's rule that Server Components can't carry event handlers.
- Stats and popular prompt cards are static display data, not computed from any real usage metrics.
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.