mirror of
https://github.com/samsonjs/vibetunnel.git
synced 2026-04-02 10:45:57 +00:00
| .. | ||
| base | ||
| shared | ||
| terminal | ||
| app-main.ts | ||
| example-modern-component.ts | ||
| glowing-app-icon.ts | ||
| index.ts | ||
| README.md | ||
| server-console-app.ts | ||
| session-detail-app.ts | ||
| settings-app.ts | ||
| settings-checkbox.ts | ||
| settings-select.ts | ||
| settings-tab.ts | ||
| welcome-app.ts | ||
VibeTunnel Lit Components
This directory contains all the Lit Web Components used in the VibeTunnel Tauri application.
Architecture
Base Components (base/)
tauri-base.js- Base class with common Tauri functionality that all components extend
Shared Components (shared/)
vt-button.js- Reusable button component with variantsvt-card.js- Card container componentvt-loading.js- Loading, error, and empty statesvt-stepper.js- Step-by-step navigation componentstyles.js- Shared CSS styles and utilities
App Components
app-main.js- Main application dashboardsettings-app.js- Settings window with tabswelcome-app.js- Welcome/onboarding flowsession-detail-app.js- Terminal session details viewerserver-console-app.js- Server logs console
Benefits of Using Lit
- Small bundle size - Lit is only ~5KB gzipped
- Web standards - Built on Web Components
- Reactive properties - Automatic re-rendering on property changes
- Declarative templates - Easy to read and maintain
- Code reuse - Components are easily shared across pages
Development
To build the components:
npm run build
To develop with hot reload:
npm run dev
Component Usage
All components are ES modules and can be imported directly:
import './components/app-main.js';
Or use the barrel export:
import { AppMain, VTButton, sharedStyles } from './components/index.js';
Styling
Components use Shadow DOM for style encapsulation. Shared styles are available in shared/styles.js and include:
- CSS custom properties for theming
- Utility classes
- Common component styles (buttons, cards, forms)
- Loading and animation helpers
Theme variables automatically adapt to light/dark mode preferences.