Chat UI Primitives
inferencesh/chatFreeBlock
Virtualized chat with measured markdown. Auto-scroll, message strategies, typing indicators.
Install it
npx shadcn@latest add https://ui.inference.sh/r/chat.jsonSource
1import React, { forwardRef, type ReactNode } from 'react';2import { cn } from '@/lib/utils';34interface ChatContainerProps {5 children: ReactNode;6 className?: string;7}89/**10 * ChatContainer - Grid layout wrapper for chat components11 *12 * @example13 * ```tsx14 * <ChatContainer className="h-screen">15 * <Header />16 * <ChatMessages>...</ChatMessages>17 * <ChatInput />18 * </ChatContainer>19 * ```20 */21export const ChatContainer = forwardRef<HTMLDivElement, ChatContainerProps>(22 ({ children, className }, ref) => {23 return (24 <div25 ref={ref}26 className={cn(27 'grid max-h-full w-full grid-rows-[auto_1fr_auto]',28 className29 )}30 >31 {children}32 </div>33 );34 }35);3637ChatContainer.displayName = 'ChatContainer';38
What it pulls in
npm packages
Other registry items
More from inferencesh
All 14 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Agent Chatagent | inferencesh | Blocks | Free | 1 dep | |
| Code Blockcode-block | inferencesh | Blocks | Free | no deps | |
| Markdown Renderer (legacy)markdown | inferencesh | Blocks | Free | 2 deps | |
| pretext-mdpretext-md | inferencesh | Blocks | Free | 4 deps | |
| Sidebar Lightsidebar-light | inferencesh | Blocks | Free | no deps | |
| Stepssteps | inferencesh | Blocks | Free | no deps | |
| Table of Contentstable-of-contents | inferencesh | Blocks | Free | no deps | |
| Tasktask | inferencesh | Blocks | Free | 1 dep |
