Docs/BLOCKS/AI Chat Hero

Full-page AI chat interface hero block, Gemini-inspired with GwenUI dark tokens. Features a customizable sidebar, interactive models dropdown, dynamic chat input with file uploads, suggestion chips with smooth micro-interactions, and high-fidelity ambient light glow effects.

Installation#

$ pnpm dlx @gwenui/cli add ai-chat-hero

File Structure#

ai-chat-hero/
├── index.tsx                # Main entry point (AIChatHero)
├── components/
   ├── ChatSidebar.tsx      # Icon-only desktop sidebar
   ├── ChatInput.tsx        # Pill-shaped chat input bar & menus
   └── SuggestionChips.tsx  # Dynamic suggestion chips row
├── hooks/
   └── useChatInput.ts      # Stdin/textarea state controller hook
└── block.json               # Block metadata configuration

Usage#

import AIChatHero from "@/components/blocks/ai-chat-hero";
 
export default function Page() {
  const handleSubmit = (value: string) => {
    console.log("Chat submitted:", value);
  };
 
  return (
    <AIChatHero
      headline="I'm Gwen, let's build our dreams together!"
      headlineAccent="Gwen"
      onSubmit={handleSubmit}
    />
  );
}

Props#

PropTypeDefaultDescription
headlinestring"I'm Gwen, lets build our dreams together!"Main hero greeting headline text.
headlineAccentstring"Gwen"Substring to apply the primary gradient glow to.
placeholderstring"Ask Gwen..."Input placeholder text.
modelNamestring"Gwen 1.0 Supreme"Default active model name.
chips{ label: string; prompt: string }[]4 defaultsSuggestion chips displayed above the input.
avatarInitialsstring"JS"Initials displayed inside the user avatar circle.
onSubmit(value: string) => voidundefinedCallback fired on message submit.
onChipClick(prompt: string) => voidundefinedCallback fired when a chip is clicked.
onModelClick() => voidundefinedCallback fired when the model selector is clicked.
onMicClick() => voidundefinedCallback fired when the mic button is clicked.
classNamestring""Extra CSS classes on the root container.
fullscreenbooleanfalseFits the container to the parent viewport.

Dependencies#

PackagePurpose
framer-motionFluid visual transitions & animations
lucide-reactVector icon library
Next.js 16TypeScriptTailwindFramer Motion
Made by JinXSuper with Gwen 🧡