# Accessibility URL: /docs/accessibility *** title: Accessibility description: Building interfaces that work for everyone. -------------------------------------------------------- Good UI doesn't exclude people. Odyssey UI is built to be usable by default—no extra configuration needed for basic accessibility. We believe that inclusive design creates better experiences for all users, not just those with disabilities. *** ## Motion & Animation ### Understanding motion sensitivity Some people experience discomfort, dizziness, or nausea from animation. Browsers and operating systems include a **Reduced Motion** setting (`prefers-reduced-motion`) for this. When enabled, users typically prefer: * Skip large movements like scaling, sliding, or rotating * Subtle opacity fades instead of motion * No parallax or auto-scrolling effects * No looping or auto-playing background animation ### How we handle it Odyssey UI uses [Motion](https://motion.dev/) under the hood. Wrap your app once to automatically respect this setting across all components: ```tsx import { MotionConfig } from 'motion/react'; export function App({ children }: { children: React.ReactNode }) { return {children}; } ``` This ensures that users who have requested reduced motion in their system preferences will automatically receive a more comfortable experience without any additional code changes in your components. ## Keyboard Navigation ### Full keyboard support All interactive elements in Odyssey UI are fully accessible via keyboard: * **Tab navigation**: Logical focus order follows the visual layout * **Focus indicators**: Clear, high-contrast focus rings show where you are * **Shortcut keys**: Common actions support standard keyboard shortcuts * **Escape handling**: Modals and dropdowns close with the Escape key * **Trap focus**: When a modal opens, focus stays within it until closed ### Testing keyboard accessibility You can verify keyboard support by unplugging your mouse and navigating your application using only: * `Tab` / `Shift+Tab` to move between elements * `Enter` or `Space` to activate buttons and links * `Arrow keys` for radio groups, sliders, and menus * `Home` / `End` for jumping to start/end of lists *** ## Screen Readers ### Semantic HTML and ARIA Odyssey UI components use proper semantic HTML elements and ARIA attributes to ensure screen readers can interpret them correctly: * **Landmarks**: Header, main, navigation, and footer regions are properly marked * **Headings**: Hierarchical heading structure for easy navigation * **Labels**: All form inputs have associated labels * **Live regions**: Dynamic content updates are announced appropriately * **Descriptions**: Complex components include supplementary text when needed ### Testing with screen readers We test with the following screen reader combinations: * NVDA + Firefox (Windows) * JAWS + Chrome (Windows) * VoiceOver + Safari (macOS and iOS) * TalkBack + Chrome (Android) **Accessibility Note:** While our components are designed with accessibility in mind, we recommend always testing with real assistive technologies and users. Automated tools catch only about 30% of accessibility issues—human testing is irreplaceable for creating truly inclusive experiences. # Changelog URL: /docs/changelog *** title: Changelog description: Latest updates and announcements. ---------------------------------------------- import Link from 'next/link'; import { Changelog, ChangelogItem, ChangelogItemTitle, ChangelogItemDescription, ChangelogItemVersion, } from '@/components/docs/changelog'; import { MotionEffect } from '@/components/effects/motion-effect'; import { PartyPopper } from '@/registry/icons/party-popper'; ## 1.0.8 AI Elements Building an AI chatbot wrapper? We've got two new components just for you. Thought Chain Animated AI reasoning component with collapsible steps and status indicators. Steps Collapsible AI tool-run steps with an animated shimmer trigger and a vertical progress bar. ## 1.0.7 Prompt Input Streamlined AI interaction entry point with contextual suggestions. Card Stroke Subtle border treatment system for depth and visual grouping. Footer Flexible bottom navigation component with collapsible sections. Smart Upload Intelligent file handling with drag-and-drop, preview, and validation support. Greetings Preloader Branded loading experience with an animated entrance sequence. ## 1.0.6 New Primitives Added the CodeBlock primitive component and the ImageZoom effect primitive. Primitive Updates Improved animation systems for Radix UI Accordion and Collapsible, Headless UI Disclosure, and Base UI Accordion and Collapsible primitives. Infrastructure Introduced a registry build system with automatic path replacement, LLM-powered documentation text generation, and a static JSON API for search. Documentation Introduced a versioned changelog system, enhanced component installation documentation, and improved clarity across all docs. ## 1.0.5 Component & Documentation Enhancements GithubStars now supports delayed rendering. CodeTabs supports multiple package managers. Manual installation guides were improved with clearer step-by-step instructions. ## 1.0.4 Design System Improvements Refined focus ring styles for better visibility. Improved color contrast in dark mode for secondary text. Updated the spacing scale for a more consistent vertical rhythm. Enhanced mobile navigation with larger touch targets. ## 1.0.3 Accessibility & Motion Improved keyboard navigation across interactive components. Added motion-safe defaults for users who prefer reduced motion. Refined transition timing for smoother UI feedback. ## 1.0.2 Early Components Added initial UI primitives such as Button, Badge, and Card. Implemented basic focus and hover states. Improved layout consistency across documentation pages. ## 1.0.1 Initial Foundation Introduced core documentation structure. Added base styling tokens and a typography scale. Set up the initial component registry layout. # Introduction URL: /docs *** title: Introduction description: A design focused component library for Next.js, built for speed, flexibility and developer experience . -------------------------------------------------------------------------------------------------------------------- **Odyssey UI is a design first UI library** built with [Tailwind CSS](https://tailwindcss.com/) and [Motion](https://motion.dev/), based on the shadcn registry and inspired by [animateui](https://animate-ui.com/) and [shadcn/ui](https://ui.shadcn.com/). Our goal is simple; components that work immediately, code you can play with, rebuild as you see fit. ## What makes Odyssey UI different * **You own the code** — Install components directly into your codebase. No version conflicts, no dependency hell, no upstream breaking changes. * **The boring stuff, done well** — Grids that behave, forms that submit, navigation that makes sense. Animation that breathes. * **Batteries included, wires exposed** — Sensible defaults that work immediately, with full access to modify internals when you need to. ## What’s included 1. **Zero lock-in** — Every component lives in your repo. Fork it, break it, rebuild it. 2. **Next.js optimized** — Server Components by default, Client Components only where necessary. App Router native. 3. **Tailwind v4 ready** — Built on the latest Tailwind with CSS-first configuration and container query support. 4. **Performance by default** — No runtime CSS-in-JS, minimal client-side JavaScript, tree-shakeable exports. 5. **Documentation that ships** — Powered by Fumadocs—fuzzy search, ready-made templates, component showcases, and full MDX support, right out of the box. ## Credits Odyssey UI stands on the shoulders of exceptional open source work: * **[Animate UI](https://animate-ui.com/)** — Core template architecture and registry patterns * **[shadcn/ui](https://ui.shadcn.com/)** — Philosophy of copy-first component distribution * **[Fumadocs](https://fumadocs.com/)** — Documentation framework and content layer * **[Magic UI](https://magicui.design/)** — Inspiration for component composition patterns ### Disclaimer **Note:** Our core templating builds on [Animate UI](https://animate-ui.com/). We've also showcased some of their components, these remain their property, not ours. **Note:** You can always turn off the sound effects by opening the context menu i.e right click. # Installation URL: /docs/installation *** title: Installation description: How to install dependencies and structure your app. ---------------------------------------------------------------- import { Step, Steps } from 'fumadocs-ui/components/steps'; import { CodeTabs } from '@/components/docs/code-tabs'; ### Initialize shadcn/ui Run the `init` command to create a new project with shadcn/ui or setup an existing one. ### Add Components Run the `add` command to add a component to your project. ### Import Components Import the component to your project. ```tsx import { CodeBlock } from '@/components/odyssey/code-block'; export default function Home() { return (
); } ```
# Troubleshooting URL: /docs/troubleshooting *** title: Troubleshooting description: How to troubleshoot common issues with Odyssey UI. --------------------------------------------------------------- ## Verify your versions | Dependency | Minimum recommended version | | ---------------- | --------------------------- | | **React** | `≥ 19` | | **Tailwind CSS** | `≥ 4.1.0` | | **Motion** | `≥ 12.23.0` | | **GSAP** | `3.14.2` | | **Base UI** | `1.0.0-beta.3` | Make sure your environment meets or exceeds these versions to ensure Odyssey UI remains compatible and stable—no one likes a shipwreck before setting sail. ## Documentation display issues Certain browser extensions can interfere with how the documentation is rendered. Common culprits include: * **[Screen Shader | Smart Screen Tinting](https://chromewebstore.google.com/detail/screen-shader-smart-scree/fmlboobidmkelggdainpknloccojpppi?hl=fr\&utm_source=ext_sidebar)** If problems persist after disabling extensions, clear your browser cache and refresh the page. When in doubt, turn it off and on again—the IT crowd knew what they were talking about. ## Other issues If you encounter any other problem, don't hesitate to [open an issue here](https://github.com/imskyleen/odysseyui/issues/new/choose). We're all ears—and fingers on keyboards. # Components URL: /docs/components *** title: Components description: Production-ready animated components for modern React and Next.js interfaces. ------------------------------------------------------------------------------------------ import { HugeiconsIcon } from '@hugeicons/react'; import { ArtificialIntelligence04Icon, Cloud, TextIcon, } from '@hugeicons/core-free-icons'; import { TagIcon } from 'lucide-react'; # Interfaces that breathe Odyssey UI is a curated kit of animated, composable components built for shipping. Every piece drops into your codebase ready to work, then bends to your design without fighting the API or untangling style overrides. Landing page, dashboard, or full app shell—build expressive interactions with tools you already know: React, TypeScript, Tailwind CSS. ## What's here? * Carefully grouped component families with practical examples. * Installation paths that work for both quick copy-paste and deeper integration. * Motion-forward UI patterns that still prioritize readability and structure. Start with the collection that matches your current priority, then expand from there as your interface grows. } href="/docs/components/logoclouds/logocloud-1" title="Logo Clouds" accent /> } href="/docs/components/ai/prompt-input" title="AI Elements" accent /> } href="/docs/components/texts/text-shimmer" title="Text Effects" accent /> } href="/docs/components/pricings/pricing-1" title="Pricing" accent /> ## Recommended path Start with **Logo Clouds** for instant brand credibility sections. Explore **AI Elements** for intelligent, interactive prompts. Layer in **Text Effects** for motion-forward typography. Check **Pricing** when you need conversion-ready layouts. # Apollo AI Chat Template URL: /docs/templates/apollo *** title: Apollo AI Chat Template description: A production-ready AI chat template built with OdysseyUI. Add your API key to the .env file and start chatting instantly. -------------------------------------------------------------------------------------------------------------------------------------- import { TemplateHeader } from '@/components/docs/template-header'; ## What is this? Apollo is a fully-featured, themeable AI chat application template built with **Next.js 16**, **React 19**, **Tailwind CSS v4**, and the **Vercel AI SDK v6**. It ships with a polished UI, multi-agent support, persistent chat history, a rich settings panel, and a suite of original OdysseyUI components — ready to clone and extend. ## Who is this for? You are a developer or team who wants a solid, beautiful foundation for an AI chat product without starting from scratch. Every detail — from animated message entries to a themeable sidebar — has been built with production quality in mind. ## Installation ### Prerequisites * Node.js 20+ * pnpm (`npm install -g pnpm`) * A Google Gemini API key — [get one at Google AI Studio](https://aistudio.google.com/app/apikey) ### Clone Repository ```bash git clone https://github.com/odysseyui-templates/apollo cd apollo ``` ### Install Dependencies ```bash pnpm install ``` ### Environment Variables Create a `.env.local` file in the project root: ```bash GOOGLE_GENERATIVE_AI_API_KEY=your_gemini_api_key_here ``` ### Run Dev Server ```bash pnpm dev ``` Open [http://localhost:3000](http://localhost:3000) in your browser. ### Other Commands ```bash pnpm build # Production build pnpm start # Start production server pnpm typecheck # TypeScript type check (no emit) pnpm lint # ESLint pnpm format # Prettier — formats all .ts/.tsx files ``` ## Features * **Multi-Agent System** — Five hand-crafted agents (Apollo, Muse, Cipher, Sage, Scholar), each with a unique personality, system prompt, and avatar color. Fully customizable via the Settings panel, persisted to `localStorage` * **Real-Time Streaming** — Token-by-token streaming via Vercel AI SDK, with a shimmer "Thinking…" indicator, a stop button to interrupt generation, and a regenerate action * **Persistent Chat History** — All chats stored in `localStorage` with auto-title, auto-save, and sidebar sections grouped by Today / Yesterday / Older * **Private / Ephemeral Mode** — Toggle private mode to run a session that is never written to storage; visual indicator in the header * **Chat Organization** — Pin, rename, delete, export, and group chats into named folders; animated sidebar transitions * **Full-Text Search** — `Ctrl+K` / `⌘K` opens a search modal with real-time results across all chat titles and message content, time-grouped and keyboard-navigable * **Markdown & Syntax Highlighting** — GitHub Flavored Markdown via `remark-gfm` with `rehype-highlight` covering 190+ languages, a copy button on every code block, and a language label * **14 Color Themes** — Light, Dark, Catppuccin, Nord, Ayu Dark, Tokyo Night, Dracula, Gruvbox Dark Soft, Gruvbox Dark Hard, Horizon, Synthwave '84, Rosé Pine, Kanagawa, Panda — each a complete set of CSS custom properties applied via `next-themes` * **Settings Panel** — Model selector, agent editor, theme picker, and a one-click "Clear all chats" action * **Context Menu** — Right-click anywhere for New Chat, New Temporary Chat, and Settings * **Prompt Input** — Auto-growing textarea with voice input (Web Speech API), stop button during streaming, and extensible attachment / web-search affordances * **Empty State** — Category tabs (Create, Explore, Code, Learn) with randomized prompt suggestions; clicking a card populates the input field ## Tech Stack | Layer | Technology | | --------------- | ----------------------------------------------------------------- | | Framework | [Next.js 16](https://nextjs.org) (App Router, Turbopack) | | UI Library | [React 19](https://react.dev) | | Language | TypeScript 5.9 | | Styling | [Tailwind CSS v4](https://tailwindcss.com) + `tw-animate-css` | | AI Provider | Google Gemini via `@ai-sdk/google` | | AI Streaming | [Vercel AI SDK v6](https://sdk.vercel.ai) (`ai`, `@ai-sdk/react`) | | Animations | Motion (Framer Motion v12) | | Icons | HugeIcons (`@hugeicons/react`) | | Component Base | shadcn/ui + Base UI | | Markdown | `react-markdown` + `remark-gfm` + `rehype-highlight` | | ID Generation | `uuid` | | Package Manager | pnpm | ## OdysseyUI Components Apollo is built on a set of original OdysseyUI primitives that you can drop into your own projects. ### `AgentAvatar` A richly-crafted SVG orb avatar with 12 preset color palettes (each with a multi-stop radial gradient, gloss shine, colored iris reflections, and a layered box-shadow glow), three sizes (`sm`, `md`, `lg`), three shapes (`circle`, `squircle`, `square`), and an optional CSS blink animation. ### `ShimmerText` A viewport-aware animated shimmer effect for text. Used as the "Thinking…" loading indicator during streaming. Supports `startOnView`, configurable `spread`, custom `color` and `shimmerColor`, and a `once` mode. ### `ThoughtChain` A step-progress component for visualizing multi-step AI reasoning chains. Each step has a `status` of `done`, `active`, or `pending` — rendered as a checkmark, spinning loader, or muted circle respectively. Steps are connected by a vertical status line and are individually collapsible. ### `PromptInput` An auto-growing textarea with submit-on-Enter, a stop button during streaming, voice input via the Web Speech API, and extensible attachment / web-search affordance buttons. ## Project Structure ``` apollo/ ├── app/ │ ├── globals.css # Tailwind base + 14 theme definitions │ ├── layout.tsx # Root layout with ChatStoreProvider & ThemeProvider │ ├── page.tsx # Main application shell │ └── api/ │ └── chat/ │ └── route.ts # Streaming AI endpoint (Vercel AI SDK + Gemini) ├── components/ │ ├── chat/ # Application-level chat UI │ │ ├── chat-area.tsx │ │ ├── empty-state.tsx │ │ ├── global-context-menu.tsx │ │ ├── header.tsx │ │ ├── markdown-renderer.tsx │ │ ├── message.tsx │ │ ├── search-modal.tsx │ │ └── sidebar.tsx │ ├── custom/ │ │ ├── avatar.tsx # Animated glossy orb avatar │ │ ├── settings-dialog.tsx # Multi-section settings panel │ │ └── theme-provider.tsx # next-themes wrapper │ ├── odysseyui/ # Reusable OdysseyUI primitives │ │ ├── prompt-input.tsx │ │ ├── text-shimmer.tsx │ │ └── thought-chain.tsx │ └── ui/ # shadcn/ui base components ├── hooks/ │ └── use-mobile.ts ├── lib/ │ ├── agents.ts # Default agent definitions │ ├── chat-store.tsx # Global state: chats, agents, folders, model │ ├── config.ts # Models, app name, temperature defaults │ ├── types.ts # TypeScript interfaces │ └── utils.ts └── public/ ``` ## Configuration ### Adding a New Model Open `lib/config.ts` and append an entry to the `MODELS` array: ```ts { id: "gemini-2.0-flash", name: "Gemini 2.0 Flash", provider: "google", description: "Latest flash model from Google", maxTokens: 8192, } ``` The new model will appear automatically in **Settings → Preferences**. ### Adding a New Agent **At runtime** — open the Settings panel, navigate to Preferences, and use the inline agent editor. **At build time** — add an entry to `DEFAULT_AGENTS` in `lib/agents.ts`: ```ts { id: "aria", name: "Aria", description: "A concise executive assistant.", systemPrompt: "You are Aria, a concise, professional executive assistant...", avatarColor: "pink", } ``` ### Adding a New Theme 1. Add a CSS class block in `app/globals.css` following the existing pattern, defining all `--variable` design tokens 2. If it is a dark-background theme, add the class name to the `@custom-variant dark` selector at the top of the file 3. Register the theme in the theme picker inside `components/custom/settings-dialog.tsx` # Templates URL: /docs/templates *** title: Templates description: Ready-to-expand starter collections for animated interfaces. ------------------------------------------------------------------------- import { RectangleHorizontalIcon } from 'lucide-react'; # Start with a complete foundation Templates are the fastest way to move from idea to polished UI. Instead of assembling every primitive manually, you begin with a structured baseline and then adapt it to your product voice, features, and content model. Each collection below gives you a different starting point: Odyssey-first motion patterns, well-known UI ecosystems, utility-first sections, and prebuilt interaction groups that can scale into full pages. ## Why templates first * You reduce setup time and avoid repetitive boilerplate. * You keep visual consistency while still controlling implementation details. * You can mix patterns from multiple ecosystems without rewriting your entire stack. # Chat Container URL: /docs/components/ai/chat-container *** title: Chat Container description: A composable chat container with auto-scroll, animated messages, empty state, scroll-to-bottom button, and divider support. ---------------------------------------------------------------------------------------------------------------------------------------- **Note:** For rendering individual messages with avatars, bubble styling, and timestamps, check out the [Message Bubble](/docs/components/ai/message-bubble) component — it's designed to work seamlessly inside `ChatContainerMessage`. ## Installation ## Usage ```tsx import { ChatContainer, ChatContainerContent, ChatContainerMessage, ChatContainerEmptyState, ChatContainerDivider, } from '@/components/odysseyui/chat-container'; export default function Page() { return (
Hello!
); } ``` ## How It Works * `ChatContainer` wraps everything in a **double-ring card shell** with a `ScrollArea` viewport internally tracked via `viewportRef`. * **Auto-scroll**: when `autoScroll` is `true` (default), the viewport scrolls to the bottom whenever a new message is registered — but only if the user was already at the bottom. * `ChatContainerMessage` calls `registerMessage()` on mount and unregisters on unmount, keeping an internal `messageCount` that powers empty-state detection and auto-scroll triggers. * `ChatContainerEmptyState` renders only when `messageCount === 0`, animating in/out with a fade+slide. * `ChatContainerScrollButton` floats above the scroll area and appears with an `AnimatePresence` transition whenever the user scrolls up past the `bottomThreshold`. * `ChatContainerDivider` renders a full-width horizontal rule with an optional centred label (e.g. "Today"). *** ## API Reference ### ChatContainer ### ChatContainerContent Centres and pads its children. Pass `className` to override `max-w-3xl` or spacing. ### ChatContainerEmptyState ### ChatContainerMessage Wraps each individual message. Animates in with a fade + upward slide and registers itself with the container context so auto-scroll and empty-state detection work correctly. ### ChatContainerScrollButton Floats over the bottom of the scroll area, visible only when the user has scrolled away from the bottom. Clicking it smooth-scrolls to the latest message. Accepts all `Button` props plus an optional `icon` override. ### ChatContainerDivider ### useChatContainer Hook that exposes the container context: `scrollToBottom`, `isAtBottom`, `isEmpty`, `messageCount`, `registerMessage`. Must be called inside a ``. # Message Bubble URL: /docs/components/ai/message-bubble *** title: Message Bubble description: A composable chat message bubble with avatar, content, and timestamp sub-components. Role-aware layout for user and assistant messages. ---------------------------------------------------------------------------------------------------------------------------------------------------- ## Installation ## Usage ```tsx import { MessageBubble, MessageBubbleAvatar, MessageBubbleContent, MessageBubbleTimestamp, } from '@/components/odysseyui/message-bubble'; export default function Page() { return ( Hey! Can you explain compound components? 10:41 AM ); } ``` ## Used with Chat Container `MessageBubble` is designed to be composed inside `ChatContainerMessage`: ```tsx import { ChatContainer, ChatContainerContent, ChatContainerMessage, ChatContainerDivider, } from '@/components/odysseyui/chat-container'; import { MessageBubble, MessageBubbleAvatar, MessageBubbleContent, MessageBubbleTimestamp, } from '@/components/odysseyui/message-bubble'; export default function Page() { return ( Hello! 10:41 AM Hi there! How can I help? 10:41 AM ); } ``` ## How It Works * `MessageBubble` accepts a `role` prop (`"user"` or `"assistant"`) and provides it to all children via React Context. * `role="user"` reverses the flex row so the avatar appears on the right; `role="assistant"` keeps it on the left. * `MessageBubbleAvatar` automatically picks a `UserIcon` or `BotIcon` fallback based on the role. Pass `src` to use a custom image. * `MessageBubbleContent` applies different background and text colours per role — `bg-primary` for user, `bg-muted` for assistant — and rounds corners asymmetrically to create a tail effect. * `MessageBubbleTimestamp` aligns right and uses a reduced opacity colour matching the bubble's role. *** ## API Reference ### MessageBubble ### MessageBubbleAvatar ### MessageBubbleContent Accepts all `div` props. Applies role-aware bubble styling automatically. ### MessageBubbleTimestamp Accepts all `p` props. Renders below the message content with a muted role-aware colour. ### useMessageBubble Hook that exposes `{ isUser: boolean }` from the bubble context. Must be used inside ``. # Model Selector URL: /docs/components/ai/model-selector *** title: Model Selector description: A modal-based AI model picker with provider filtering, search, starred models, and capability badges. ------------------------------------------------------------------------------------------------------------------ ## Installation ## Usage For provider icons, you can use [svgl](https://svgl.app/) — a beautiful library of SVG logos for popular brands and services. ```tsx import { ModelSelector, ModelSelectorTrigger, ModelSelectorModal, type Provider, type Model, } from '@/components/odysseyui/model-selector'; const PROVIDERS: Provider[] = [ { id: 'openai', icon: , label: 'OpenAI' }, { id: 'anthropic', icon: , label: 'Anthropic' }, ]; const MODELS: Model[] = [ { id: 'gpt-5.4', provider: 'openai', name: 'GPT-5.4', desc: "OpenAI's latest fast model for everyday chat", cost: '2x', tag: 'NEW', caps: ['vision', 'tools', 'search'], starred: true, }, { id: 'claude-s-4.6', provider: 'anthropic', name: 'Claude Sonnet 4.6', desc: "Anthropic's latest Sonnet for real-world work", cost: '2x', tag: null, caps: ['vision', 'tools', 'search'], starred: false, }, ]; export default function Page() { return ( ); } ``` ## How It Works * `ModelSelector` is the root context provider — pass your `providers`, `models`, and an optional `defaultModel`. * `ModelSelectorTrigger` renders a pill button showing the active model name (with shimmer animation) and its cost multiplier. * `ModelSelectorModal` opens as a bottom sheet on mobile and a centered dialog on `sm+` screens. * The **header** contains a live search input that filters models by name and description. * The **sidebar** lists provider icons for filtering by provider; clicking the active provider deselects it (shows all). * Each **model row** displays the provider icon, model name, optional tag badge, description, cost, capability badges, and a star toggle. * Starring is local state — starred models persist for the session via a `Set`. * Selecting a model closes the modal and updates the trigger label. *** ## API Reference ### ModelSelector ### ModelSelectorTrigger ### Provider ### Model # Prompt Input URL: /docs/components/ai/prompt-input *** title: Prompt Input description: Simple Prompt Interface input design. -------------------------------------------------- ## Installation ## Usage ```tsx import PromptInput from '@/components/odysseyui/prompt-input'; export default function Page() { return ; } ``` ## How It Works * Uses a **controlled textarea** with internal state. * Automatically resizes using `useLayoutEffect` (max height: 240px). * Pressing **Enter (without Shift)** prevents newline and can trigger submit logic. * Includes: * File attachment trigger * Search toggle button * Microphone button * Send button * Hidden `` handles file selection. * Search button toggles active visual state. *** ## API Reference ### PromptInput > Note: This component currently does not expose external props.\ > It is designed as a self-contained prompt UI.\ > You can extend it by adding `onSubmit`, `onFileUpload`, or `onSearchToggle` props. *** ## Examples ### Basic Usage ```tsx ``` # Search Modal URL: /docs/components/ai/search-modal *** title: Search Modal description: A full-featured chat search modal with conversation preview, inline rename/delete, keyboard navigation, and time-grouped results. ---------------------------------------------------------------------------------------------------------------------------------------------- ## Installation This component ships with a `MarkdownRenderer` helper (installed alongside it) that renders assistant messages with syntax-highlighted code blocks. It requires `react-markdown`, `remark-gfm`, and `rehype-highlight` — all included as dependencies. For code block syntax highlighting styles, add a `highlight.js` theme CSS to your project (e.g. `highlight.js/styles/github-dark.css`). ## Usage ```tsx import { useState } from 'react'; import SearchModal from '@/components/odysseyui/search-modal'; export default function Page() { const [open, setOpen] = useState(false); return ( <> setOpen(false)} onNewChat={() => { /* start a new chat */ }} /> ); } ``` ## Keyboard Shortcuts | Key | Action | | -------------- | ------------------------------ | | `↑` / `↓` | Navigate between conversations | | `Enter` | Go to selected conversation | | `Escape` | Close the modal | | `Ctrl+Shift+P` | Toggle preview panel | | `Ctrl+Shift+E` | Rename selected conversation | | `Ctrl+Shift+D` | Delete selected conversation | ## How It Works * **Search**: Filters conversations by title and message content as you type. * **Time groups**: Conversations are automatically bucketed into *Today*, *Yesterday*, *Last 7 Days*, and *Earlier*. * **Preview panel**: Selecting a conversation shows its full message thread on the right, with `MarkdownRenderer` rendering assistant messages. * **Inline rename**: Click the pencil icon (or `Ctrl+Shift+E`) to rename a chat in-place; confirm with `Enter` or `Escape` to cancel. * **Delete**: Click the trash icon (or `Ctrl+Shift+D`) to remove a conversation without confirmation. * **Auto-select**: The first result is always pre-selected when the query changes. *** ## API Reference ### `SearchModal` | Prop | Type | Default | Description | | ----------- | ------------ | ----------- | --------------------------------------- | | `open` | `boolean` | — | Controls modal visibility | | `onClose` | `() => void` | — | Called when the modal requests to close | | `onNewChat` | `() => void` | `undefined` | Called when the user clicks "New Chat" | # Steps URL: /docs/components/ai/steps *** title: Steps description: A collapsible AI tool-run steps component with an animated shimmer trigger and a vertical progress bar. -------------------------------------------------------------------------------------------------------------------- ## Installation ## Usage ```tsx import { FileSearch } from 'lucide-react'; import { Steps, StepsTrigger, StepsContent, StepsBar, StepsItem, } from '@/components/odysseyui/steps'; export default function Page() { return ( }> Tool run: analyze repo }>
Cloning repository odyssey-ui/www Detected TypeScript + Tailwind CSS Found 142 components across 6 packages Dependency graph resolved in 280ms
); } ``` ## How It Works * `Steps` wraps a shadcn `Collapsible` and defaults to open via `defaultOpen`. * `StepsTrigger` renders a shimmer-animated label via `ShimmerText`. * When a `leftIcon` is provided it swaps to a `ChevronDown` on hover (togglable via `swapIconOnHover`). * Without a `leftIcon`, a plain `ChevronDown` is appended to the right of the label instead. * `StepsContent` lays out a two-column grid: the vertical bar column and the content column. * `StepsBar` is a 2px vertical line that highlights blue on hover via the parent `group` class. * `StepsItem` highlights its text on hover and styles any `` children in blue. *** ## API Reference ### Steps ### StepsTrigger ### StepsContent ### StepsBar A 2px vertical divider line. Highlights to `blue-500/40` on hover via the parent group context. Accepts all standard `div` props. ### StepsItem A single content row. Highlights on hover; `` children are rendered in `blue-500`. Accepts all standard `div` props. # Thought Chain URL: /docs/components/ai/thought-chain *** title: Thought Chain description: An animated AI reasoning step-by-step thought chain component with collapsible steps and status indicators. ------------------------------------------------------------------------------------------------------------------------ ## Installation ## Usage ```tsx import { ThoughtChain, ThoughtChainStep, ThoughtChainTrigger, ThoughtChainContent, ThoughtChainItem, } from '@/components/odysseyui/thought-chain'; export default function Page() { return ( Understanding the codebase Scanned 47 files across src/ and packages/ Identified React 18 with TypeScript and Tailwind CSS No existing auth layer detected Planning the implementation Choosing NextAuth.js for session management Designing protected route middleware Writing the code auth.ts — provider config middleware.ts — route protection SessionProvider wrapper ); } ``` ## How It Works * Each `ThoughtChainStep` accepts a **`status`** prop: `"done"`, `"active"`, or `"pending"`. * Steps are collapsible — clicking the trigger toggles the content open/closed. * The **active** step renders its trigger label with a **shimmer animation** via `ShimmerText` and shows an **"In progress"** badge. * The **done** step shows a green checkmark icon; **active** shows a spinning loader; **pending** shows a muted circle. * `ThoughtChainContent` uses `AnimatePresence` for smooth height-animated expand/collapse transitions. * `ThoughtChainItem` entries animate in with a fade + slide from above. * `ThoughtChain` automatically injects `_isLast` into the last child step to allow conditional styling. *** ## API Reference ### ThoughtChain Wrapper component that clones children and injects the `_isLast` prop into the final step. ### ThoughtChainStep ### ThoughtChainTrigger Clickable header that toggles the step's collapsible content. When the step is `active` and the children is a plain string, it renders with a shimmer animation. ### ThoughtChainContent Animated collapsible body. Uses `AnimatePresence` with height and opacity transitions. ### ThoughtChainItem Individual bullet item inside `ThoughtChainContent`. Animates in with a fade + upward slide. # Token Usage URL: /docs/components/ai/token-usage *** title: Token Usage description: A token usage card showing input/output counts, costs, a proportion bar, and an interactive token breakdown with type-based color badges. ------------------------------------------------------------------------------------------------------------------------------------------------------ ## Installation ## Usage ```tsx import { TokenUsage } from '@/components/odysseyui/token-usage'; export default function Page() { return ; } ``` ## How It Works * Displays **input** and **output** token counts with their individual costs side-by-side. * A **proportion bar** visualises the input/output split using violet and sky segments. * The **token breakdown** section renders each token as a `Badge` colored by type — secondary for regular text, orange for control characters, and purple for system tokens. * Hovering any token badge shows a `Tooltip` describing the token type. # Card Stroke URL: /docs/components/animate/card-stroke *** title: Card Stroke description: A card component with an animated SVG stroke and word-by-word text reveal on hover. ------------------------------------------------------------------------------------------------ ## Installation **Note:** This component uses **GSAP** with the **SplitText** plugin for word-based animations. It is inspired by this amazing post by [joaopaulots](https://x.com/joaopaulots/status/2019123435310596275) ## Usage ```tsx import CardStroke from '@/components/odysseyui/card-stroke'; export default function Page() { return ( ); } ``` ## How It Works * Uses **GSAP** timelines for hover animations. * Uses **SplitText** to animate title and description word-by-word. * SVG paths are animated using `strokeDasharray` and `strokeDashoffset`. ### On Hover * Stroke expands and reveals. * Title and description slide up into view. ### On Mouse Leave * Stroke retracts. * Text animates back down. *** ## API Reference ### CardStroke ## Examples ### Custom Colors ```tsx ``` ### Custom Image ```tsx ``` ### With Custom Styling ```tsx ``` # Code Block URL: /docs/components/animate/code-block *** title: Code Block description: A styled code block frame component with language badge and optional copy functionality. ----------------------------------------------------------------------------------------------------- ## Installation ## Usage ```tsx ``` ## API Reference ### CodeFrame ## Examples ### With Different Languages ```tsx ``` ### With Custom Styling ```tsx ``` # Code Tabs URL: /docs/components/animate/code-tabs *** title: Code Tabs description: A tabs component that displays code for different languages. author: name: imskyleen url: [https://github.com/imskyleen](https://github.com/imskyleen) ----------------------------------------------------------------- ## Installation ## Usage ```tsx ``` ## API Reference ### CodeTabs ', required: true, }, lang: { description: 'The language of the code', type: 'string', required: false, default: 'bash', }, themes: { description: 'The shiki themes to display in the tabs', type: 'Record', required: false, default: "{ light: 'github-light', dark: 'github-dark' }", }, copyButton: { description: 'Whether to show the copy button.', type: 'boolean', required: false, default: 'true', }, onCopiedChange: { description: 'The callback function when the code is copied.', type: '(copied: boolean, content?: string) => void', required: false, }, }} /> # Footer URL: /docs/components/animate/footer *** title: Footer description: A minimal footer design inspired by Dia browser . -------------------------------------------------------------- ## Installation **Note:** This footer is inspired by [Dia Browser](https://www.diabrowser.com/). ## Usage ```tsx import Footer from '@/components/odysseyui/footer'; export default function Page() { return (