AI Prompt Starter Grid
A grid of AI prompt template cards, each showing an icon, title, category badge, and short description, organized into filterable category tabs (Writing, Coding, Ideas, Analysis, Marketing, Learning). Cards lift slightly on hover for a light interactive feel while the underlying tab switching stays fully native.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its tabs, badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/prompt-starter-grid.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/chat/chat8.tsx instead.
Usage
The file also exports chat8Demo, 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 { Chat8, chat8Demo } from "@/components/blocks/chat/chat8"; export default function Page() { return <Chat8 {...chat8Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Start from a template" | Section heading. |
| description | string | "Browse prompt templates by category..." | Section subheading. |
| categories | Chat8Category[] | none | Category tabs, each with its own list of prompt templates. |
| defaultCategory | string | undefined | Value of the category tab selected by default; falls back to the first category. |
| className | string | none | Extra classes for the outer section element. |
Types
export interface PromptTemplate { id: string; title: string; description: string; } export interface Chat8Category { value: string; label: string; templates: PromptTemplate[]; }
Behavior notes
- Fully static and server-rendered: category filtering uses the real Tabs/TabsList/TabsTrigger/TabsContent primitives with an uncontrolled defaultValue, no client-side state needed in this component.
- The card hover lift and shadow are pure CSS (hover:), no JS.
- Category icons are chosen from a fixed lookup by category value, not passed as prop data (icons can't cross the client boundary as props, and this block doesn't need to be a client component anyway).
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.
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.
floating-chat-widget
Floating Chat Widget with Expandable Window
A corner chat bubble with a pulsing notification dot that expands into a mini chat window.