Shadcn UI AI Chat Blocks

AI chat blocks built with shadcn/ui and AI Elements: chat homes with history sidebars, composers with file attachments, model pickers, suggestion chips, conversations with thinking states and assistant side panels.

AI Chat 1 Free

Chat home with a sidebar of grouped chat history, a header model menu with copy link and share buttons, a composer with research, image and reasoning toggles, a connect tools row and three starter cards.

AI Chat 2 Pro

Minimal chat home with a sidebar search field, pinned and dated chats, a greeting, a composer with an add content menu, dictation and voice buttons, an incognito toggle and a model and effort picker.

AI Chat 3 Pro

Assistant workspace with tool navigation, collapsible Recent and Favorites groups, a Research Pro card, breadcrumbs, a dotted canvas of four selectable template cards and a composer with Fix bug, Research and Deep research toggles.

AI Chat 4 Pro

Sales assistant home with a workspace switcher, Sequencing navigation, an onboarding progress card, a lead search bar, a composer with a model select, four quick action chips and three lead and connect cards.

AI Chat 5 Pro

Single centered composer with a two tone heading, an Attach button, a web search toggle, a writing style select, a voice input toggle and removable file chips, without sidebar or header.

AI Chat 6 Pro

Legal assistant start page with four task cards that fill the prompt, a composer with a Research, Review and Draft select, and a tray below it for choosing the client, analyzing documents and setting jurisdiction.

AI Chat 7 Pro

Logged out chat landing page with a language menu, Log in button, composer with model select, web search toggle and attach button, four dashed example prompts and a footer with social icons and links.

AI Chat 8 Pro

Composer with a model popover opened by default: searchable list with provider logos, Auto and Multiple models switches, a More models page, a disabled Soon entry, a Temporary chat switch and a preattached meeting file.

AI Chat 9 Pro

Chat home with a six item sidebar, a waving greeting, three idea cards that fill the prompt, a composer with an upload and image creation menu, a voice button and five quick prompt chips.

AI Chat 10 Pro

Recruiting assistant with a searchable sidebar, a welcome composer with Attach, Upload images and tone select, four feature cards and a Conversations column with rename and delete menus on wide screens.

AI Chat 11 Pro

Finance assistant with a workspace menu, sidebar navigation with a Budget badge, a trial card, a model banner above the composer, attach, image and receipt buttons and three prompt cards that a Refresh button swaps.

AI Chat 12 Pro

Image generator with three stacked cover images, a greeting, recent prompt buttons, a dismissible upgrade banner, ratio and style selects and generated image thumbnails that appear after a shimmering Generating status.

AI Chat 13 Pro

Centered composer with a segmented research, image and ideas toggle, a model dropdown, web search, attach and voice buttons, a connected tools popover with switches per app and three starter cards.

AI Chat 14 Pro

Conversation screen with a folder sidebar, collapsible assistant replies with clickable style and font choices, a Thinking shimmer, a prompt library menu, an Improve prompt button and a creativity and web access drawer.

AI Chat 15 Pro

Group chat window with member avatars, a video call button group, bubbles with a shared file card and heart reaction, a New divider, a Polish with AI button and a split Send button.

About Shadcn UI AI Chat Blocks

An AI chat interface is the screen where people ask an assistant for help: a composer for prompts and files, a place for replies and the controls around them, such as chat history, model choice and suggested prompts. These twenty one shadcn blocks cover the main shapes of that screen, from full chat homes with a sidebar to assistant panels and a floating widget that sit on top of an existing page.

Like all our shadcn blocks, they are written in React and TypeScript and styled with Tailwind CSS. The layout comes from shadcn ui components such as Sidebar, Dropdown Menu, Item, Card and Drawer, while the chat parts use AI Elements: Prompt Input, Attachments, Conversation, Message, Suggestion and Shimmer. Everything is wired with local state, so you can attach files, switch modes and click starters before connecting a real model.

Key Elements of an AI Chat Interface

  • Composer: a textarea that sends on Enter, keeps Shift+Enter for new lines and shows attached files as chips.
  • Mode and model controls: selects, toggle groups or menus for the model, writing style, research mode or answer speed.
  • Start screen helpers: greetings, starter cards and suggestion chips that show what the assistant is good at.
  • Chat history: grouped recent, pinned or saved chats in a sidebar, a side column or a dropdown.
  • Reply area: message bubbles, a scroll to bottom button and a shimmering status line while the assistant works.
  • Context and trust cues: source chips, connected tools and a short note that answers can contain mistakes.

Where and Why to Use AI Chat Blocks

Most of the work in an AI product happens on one screen, and small details decide whether people use it: how fast they find a starting point, whether they can see what the assistant read and how easily they switch models or modes. These shadcn components give you those details already arranged, so you can spend your time on the model and the data instead of the composer. Because they share the same theme tokens as the rest of the kit, the chat matches your dashboard or marketing pages in light and dark mode.

  • Standalone chat products: a full page assistant with history, model choice and starter prompts.
  • In-app copilots: a side panel or floating widget that answers questions about the page a user is on.
  • Vertical assistants: sales, legal, finance or recruiting tools where the starters and context controls speak the language of one field.
  • Image generation tools: a prompt with ratio and style controls and a strip of generated results.
  • Team messaging with AI help: a group thread with files, reactions and a button that polishes a draft.
  • Public landing chats: a logged out entry point with example prompts, a login button and footer links.

AI Chat Blocks in This Collection

  • AI Chat 1: A general purpose starting point for a consumer chat app. The free block of the set, with a prompt to connect Gmail, Calendar, Docs and GitHub under the composer.
  • AI Chat 2: Fits a calm, writing focused assistant. An incognito toggle changes the placeholder, and a project menu sits next to the model and effort picker.
  • AI Chat 3: Good for marketing or research teams who start from templates. Picking a card marks it as selected and loads its prompt into the composer.
  • AI Chat 4: Made for a sales or outreach tool where onboarding progress, lead credits and quick actions matter as much as the chat itself.
  • AI Chat 5: The lightest option when you only need a polished composer, for example inside an existing page or as the hero of a product.
  • AI Chat 6: Suits professional tools where every request needs context. The tray under the composer keeps the client, documents and jurisdiction in view.
  • AI Chat 7: A public, logged out chat page with a language menu and a footer, ready to serve as the homepage of a chatbot.
  • AI Chat 8: Choose it when users pick between many models from several providers. The picker opens by default so you can review it right away.
  • AI Chat 9: A friendly home screen for everyday users, with a greeting, three idea cards and one tap prompts under the composer.
  • AI Chat 10: Fits an assistant inside a larger app, such as a hiring platform, where past conversations live in their own column on wide screens.
  • AI Chat 11: Built for a money or budgeting app. The prompt cards rotate through two sets so returning users see fresh ideas.
  • AI Chat 12: The pick for image generation. Results appear as removable thumbnails above the prompt, and a banner can promote a paid plan.
  • AI Chat 13: A composer first page where users decide which tools the assistant may use, with a live count of connected apps.
  • AI Chat 14: Shows how an assistant can offer choices inside a reply. Style and font options send a follow up when clicked, which fits design or code generators.
  • AI Chat 15: A team chat rather than a bot chat, useful when AI is a helper inside messaging. Sent files turn into attachment cards in the thread.
  • AI Chat 16: A left aligned, editorial take on the chat home that leaves more room for a prompt gallery below the composer.
  • AI Chat 17: The most minimal full flow: one tap starters send at once, and the screen switches from the start view to a conversation.
  • AI Chat 18: Place it beside a document or dashboard so users can question what they see and check which notes the answer came from.
  • AI Chat 19: Use it when an assistant should confirm scope before running a long task. Answers are pre selected, so confirming takes a few clicks.
  • AI Chat 20: A support style widget for any page. It can grow wider, shrink to a round launcher and start over with a fresh chat.
  • AI Chat 21: The richest workspace in the set, for assistants with several sections, saved assistants and a configuration drawer for memory and web access.

Similar Block Categories

  • Chat UI: person to person messaging layouts when your product needs chat between users as well as with an assistant.
  • Sidebar Layouts: more navigation patterns to wrap around the assistant in a larger app.
  • Empty State: first run screens for the parts of your app where there is no chat yet.
  • Onboarding Screens: collect the context an assistant needs before the first prompt.
  • Pricing Tables: the next step after the upgrade buttons and trial cards shown in several chat blocks.

Accessibility

The composer is a real form: Enter submits, Shift+Enter adds a line and the submit button is labelled Submit or Stop. Conversation areas use role="log", so screen readers treat new messages as a live feed. Many icon buttons carry an aria-label, such as Copy link, New chat, Minimize or Close, and toggles like web search, dictation and incognito expose their state with aria-pressed. AI Chat 19 binds every checkbox and radio card to its label, and its A to D shortcuts ignore key presses while the user types in a field. The drawers in AI Chat 14 and AI Chat 21 connect their switches to labels with htmlFor.

Some icon only buttons, such as the paperclip and microphone in several composers, have a tooltip but no aria-label, so consider adding one. In AI Chat 10 the conversation menu button only becomes visible on hover, and making it visible on keyboard focus as well would help. The Creativity slider in AI Chat 14 could use an aria-label too. The shimmering status text animates continuously, so you may want to tone it down for visitors who prefer reduced motion.

AI Chat FAQ

An AI chat interface is the screen where people talk to an assistant. It is built around a composer for prompts and files, a place where replies appear, and helpers for getting started such as starter prompts, a chat history and a model picker.

They are complete assistant screens built with shadcn ui and Tailwind CSS: chat homes with a sidebar, centered composers, conversations, side panels and a floating widget. Each block combines shadcn components like Sidebar, Dropdown Menu and Item with AI Elements such as Prompt Input, Attachments, Conversation and Shimmer.

A blank text box makes people guess what the assistant can do. Starter cards, suggested questions and a short greeting show the scope of the product and turn the first visit into a first prompt. Most blocks in this collection put that work on the start screen, before any message is sent.

A composer that accepts text and files, a clear send button, a visible state while the assistant works, readable replies and a way to start over or return to an earlier chat. A model or mode control, prompt suggestions and a short note that answers can be wrong round it out.

Give it a full page when chatting is the product itself, as in AI Chat 1 or AI Chat 9. Put it in a side panel when people ask about the page they are on, as in AI Chat 18 and AI Chat 19. Use a floating widget like AI Chat 20 when help should be one click away without taking space.

Yes. AI Chat 1, the chat home with a history sidebar, research and image toggles and three starter cards, is free. Add it with npx shadcn@latest add @shadcnuikit/ai-chat1. The other twenty blocks are part of All Access.

Every block uses the Prompt Input and Attachments components from AI Elements, which import types from the ai package and use nanoid. Conversation blocks add Conversation, which relies on use-stick-to-bottom, and Shimmer, which animates with motion. Most blocks also show toasts with sonner.

Each block passes a handleSubmit function to PromptInput, and it receives a message with the typed text and the attached files. Right now it shows a toast or, in the conversation blocks, adds a canned reply after a short timeout. Replace that part with a call to your API route or the AI SDK useChat hook and render the streamed reply in the same message list.

AI Chat 14, AI Chat 17, AI Chat 18 and AI Chat 20 add your message as a bubble, show a shimmering status line and then append an assistant reply. AI Chat 12 returns generated images instead of text. AI Chat 15 appends your own messages and attached files to a team thread.

AI Chat 8. Its popover holds a searchable command list with provider logos, Auto and Multiple models switches, a second page for more models, a disabled Soon entry and a Temporary chat switch. Simpler model menus sit in the header of AI Chat 1, AI Chat 14, AI Chat 17 and AI Chat 19, and AI Chat 2 pairs the model with an effort level.

In most blocks the textarea is controlled by a text state, and each card or chip calls setText with its prompt. AI Chat 6 wraps the page in PromptInputProvider and writes the task into the composer with the controller. In AI Chat 17 and AI Chat 20 a starter sends the message right away instead of filling the field.

The attach buttons call openFileDialog from the Prompt Input attachments hook. Chosen files appear as removable chips above the textarea, and Backspace in an empty textarea removes the last one. AI Chat 8 also starts with a meeting recording attached. AI Chat 12 and AI Chat 18 are the only blocks without file uploads.

AI Chat 4 is a sales assistant for leads and campaigns, AI Chat 6 a legal workspace with clients and jurisdictions, AI Chat 10 a recruiting assistant, AI Chat 11 a personal finance assistant and AI Chat 12 an image generator. AI Chat 19 frames an analytics question as a short brief.

The questions live in an array, and each one has a multiple flag. Multiple choice questions render checkbox cards, single choice ones render a radio group, and the letters A to D select options from the keyboard. A progress bar, Back and Next buttons and a final summary complete the flow, and the Sources menu in the composer stays in sync with the first answer.

Blocks with a sidebar use the shadcn Sidebar, which opens as a sheet from the trigger on small screens. Button labels such as Deep research or Attach collapse to icons below the sm breakpoint. In AI Chat 18 and AI Chat 19 the panel takes the full width and the page behind it is hidden below lg, AI Chat 10 shows its conversations column only from xl, and the AI Chat 20 widget fills the screen on phones.

In plain arrays at the top of each file, such as history, starters, models, templates or suggestions. Edit the strings, swap the lucide icons and the layout follows. The model names are sample text, so replace them with the models your backend really serves.
shadcn ui ai chat blocks
Unlock Premium Blocks & Sections
Premium blocks are part of All Access. One license unlocks the whole Shadcn UI Kit, so you can build complete pages and products instead of single sections.
  • 550+ blocks for landing pages, stores, dashboards and apps
  • 16 admin dashboards and 17 ready-made apps
  • 5 premium Next.js website templates
  • 560+ component variants and 70+ examples
  • Install with the shadcn CLI or from your AI editor through the MCP server
  • Lifetime updates, including every new block we release
Unlock Now

One-time payment, no subscription.