Osmium is a comprehensive collection of components based on shadcn/ui and AI SDK 5 designed to help developers quickly implement chat-with-AI experiences in their applications. It simplifies the development of AI chat applications by providing pre-built, customizable components that handle the complexities of real-time messaging interfaces. Whether you’re building a customer support chatbot, an AI assistant, or any conversational AI application, Osmium gives you the building blocks to get started quickly.

Core Components

Chat Component

The heart of Osmium is the Chat component, which consists of three main parts:
  • Message Item: Renders individual message content with markdown support and copy to clipboard functionality
  • Message List: Displays conversation history with proper formatting and styling
  • Message Input: Handles user input with auto-resize, send/stop functionality

Built-in Features

Osmium comes with carefully crafted UI/UX features specifically tailored for AI chat applications:

Scrolling and Spacing Management

  • Auto Message Spacing: Automatically manages spacing to leave enough room for upcoming messages, ensuring optimal readability and a smooth conversational flow
  • Auto Scrolling Detection: Automatically detects whether the user is at the bottom of the conversation and displays a “scroll to bottom” icon when they’ve scrolled up, enabling quick navigation back to the latest messages