All blocks
[43] AI
Suggested Prompts
A greeting, a prompt box and four starter prompts in two columns, centered on an empty screen.
1280px
Copy the code
One file with one component and its sample data. It needs @vaneui/ui and its stylesheet, set up as in the installation guide. It passes an onSubmit handler, so in the Next.js App Router add "use client" at the top of its file.
suggested-prompts.tsx
import type { ReactNode } from "react";import { Avatar, Card, Col, Container, Grid2, IconButton, PageTitle, Row, Section, Text, Textarea } from "@vaneui/ui";
function Svg({ children }: { children: ReactNode }) { return ( <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> {children} </svg> );}
const prompts = [ { title: "Summarize this week", text: "What shipped, what slipped and who is blocked.", icon: <Svg><path d="M4 6h16M4 12h10M4 18h7" /></Svg> }, { title: "Draft a status update", text: "For the Website relaunch, from its tasks and comments.", icon: <Svg><path d="M4 20h4L19 9l-4-4L4 16zM13 7l4 4" /></Svg> }, { title: "Find overdue tasks", text: "Across all my projects, sorted by due date.", icon: <Svg><circle cx="12" cy="13" r="8" /><path d="M12 9v4l2 2M9 2h6" /></Svg> }, { title: "Plan the next sprint", text: "Pick tasks that fit the team's time off.", icon: <Svg><rect x="3" y="5" width="18" height="16" rx="2" /><path d="M3 10h18M8 3v4M16 3v4" /></Svg> },];
export function SuggestedPrompts() { return ( <Section tag="main" justifyCenter className="min-h-dvh"> <Container> <Col xl wFull className="max-w-2xl"> <Col itemsCenter> <Avatar lg filled alt=""> <Svg><path d="M12 3v4M12 17v4M3 12h4M17 12h4M6 6l2.5 2.5M15.5 15.5 18 18M6 18l2.5-2.5M15.5 8.5 18 6" /></Svg> </Avatar> <Col xs itemsCenter> <PageTitle textCenter>Good morning, Ana</PageTitle> <Text lg secondary textCenter>What should we work on?</Text> </Col> </Col> <Card tag="form" onSubmit={(e) => e.preventDefault()} shadow> <Textarea autosize rows={2} noBorder noInsetRing transparent aria-label="Message" placeholder="Ask about your projects, tasks or docs" /> <Row justifyEnd> <IconButton type="submit" filled aria-label="Send"><Svg><path d="M12 19V5M6 11l6-6 6 6" /></Svg></IconButton> </Row> </Card> <Grid2 sm> {prompts.map((p) => ( <Card key={p.title} tag="button" type="button" sm itemsStart textLeft cursorPointer focusVisible> <Row sm> <Text tag="span" secondary>{p.icon}</Text> <Text tag="span" sm fontSemibold>{p.title}</Text> </Row> <Text sm secondary>{p.text}</Text> </Card> ))} </Grid2> </Col> </Container> </Section> );}Adapt it with your coding agent
Add the VaneUI MCP server, and your agent reads the component docs and prop tables while it changes the block: the copy, the sample data or the layout.
$ claude mcp add vaneui -- npx -y @vaneui/mcp
Setup for other editors is in the AI assistants guide.