# Suggestion A suggestion component that displays a horizontal row of clickable suggestions for user interaction. The `Suggestion` component displays a horizontal row of clickable suggestions for user interaction. See `scripts/suggestion.tsx` for this example. ## Installation ```bash npx ai-elements@latest add suggestion ``` ## Usage with AI SDK Build a simple input with suggestions users can click to send a message to the LLM. Add the following component to your frontend: ```tsx title="app/page.tsx" "use client"; import { PromptInput, type PromptInputMessage, PromptInputTextarea, PromptInputSubmit, } from "@/components/ai-elements/prompt-input"; import { Suggestion, Suggestions } from "@/components/ai-elements/suggestion"; import { useState } from "react"; import { useChat } from "@ai-sdk/react"; const suggestions = [ "Can you explain how to play tennis?", "What is the weather in Tokyo?", "How do I make a really good fish taco?", ]; const SuggestionDemo = () => { const [input, setInput] = useState(""); const { sendMessage, status } = useChat(); const handleSubmit = (message: PromptInputMessage) => { if (message.text.trim()) { sendMessage({ text: message.text }); setInput(""); } }; const handleSuggestionClick = (suggestion: string) => { sendMessage({ text: suggestion }); }; return (