docs/core-features/testing-your-application.mdx
<video controls className="w-full aspect-video rounded-xl" src="https://vkcdn.britannio.dev/showcase/flat-task-panel/vk-onb-companion-demo-3.mp4"
</video>
Preview Mode provides an embedded browser experience within Vibe Kanban, allowing you to test and iterate on your web applications without leaving the development environment. This feature eliminates the need to switch between your browser and Vibe Kanban by providing live preview capabilities and precise component selection tools.
Key Benefits:
Common examples:
npm run dev (Vite, Next.js)npm start (Create React App)yarn dev (Yarn projects)pnpm dev (PNPM projects)Manual Installation:
Add the dependency to your project:
npm install vibe-kanban-web-companion
Then add the companion to your application:
<Tabs> <Tab title="Create React App"> Add to your `src/index.js` or `src/index.tsx`: ```jsx import { VibeKanbanWebCompanion } from 'vibe-kanban-web-companion'; import React from 'react'; import ReactDOM from 'react-dom/client'; import App from './App';const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<React.StrictMode>
<VibeKanbanWebCompanion />
<App />
</React.StrictMode>
);
```
function MyApp({ Component, pageProps }: AppProps) {
return (
<>
<VibeKanbanWebCompanion />
<Component {...pageProps} />
</>
)
}
```
ReactDOM.createRoot(document.getElementById("root")).render(
<React.StrictMode>
<VibeKanbanWebCompanion />
<App />
</React.StrictMode>
);
```
The system will:
Once your development server is running and a URL is detected:
The preview toolbar provides essential controls for managing your preview experience:
<Frame> </Frame>At the bottom of the Preview panel, you'll find Dev Server Logs that can be expanded or collapsed. These logs show real-time output from your development server, making it easy to monitor server activity, errors, and debugging information without leaving the preview.
<Frame> </Frame>When the Web Companion is installed, you can precisely select UI components for targeted feedback:
<Steps> <Step title="Activate Selection Mode"> Click the floating Vibe Kanban companion button in the bottom-right corner of your application to activate component selection mode. <Frame> </Frame> </Step> <Step title="Choose Component Depth"> When you click a component, Vibe Kanban shows a hierarchy of components from innermost to outermost. Select the appropriate level for your feedback:If the preview doesn't load automatically, ensure your development server prints the URL to stdout/stderr for automatic detection.
Supported URL formats:
http://localhost:3000https://localhost:3000http://127.0.0.1:3000http://0.0.0.0:5173