@mdxui/cockpit
v0.2.0
Published
App template components for mdxui - developer dashboards, auth flows, and SaaS patterns
Readme
@mdxui/cockpit
App template components for mdxui - developer dashboards, auth flows, and SaaS patterns.
Installation
npm install @mdxui/cockpit @mdxui/primitives @mdxui/themes mdxui
# or
pnpm add @mdxui/cockpit @mdxui/primitives @mdxui/themes mdxuiQuick Start
import { App, DeveloperDashboard } from '@mdxui/cockpit'
export default function Dashboard() {
return (
<App
branding={{
name: 'My App',
logo: <Logo />,
}}
theme="default"
/>
)
}Auth Pages
import { LoginPage, SignupPage, OTPPage } from '@mdxui/cockpit/auth'
// Login page with all options
<LoginPage
logo={<Logo />}
title="Welcome back"
onSubmit={handleLogin}
providers={['google', 'github']}
/>
// Signup with onboarding
<SignupPage
logo={<Logo />}
onSubmit={handleSignup}
/>
// OTP verification
<OTPPage
logo={<Logo />}
email="[email protected]"
onVerify={handleVerify}
/>Components
Main Dashboard
App/DeveloperDashboard- Full dashboard wrapper with routingDashboardLayout- Layout with sidebar navigationDashboardGrid- Responsive grid for dashboard widgets
Auth Components
AuthLayout- Shared auth page layoutLoginPage- Login with social providersSignupPage- Registration flowPasswordResetPage- Password recoveryOTPPage- One-time password verificationOnboardingPage- User onboarding wizard
Dashboard Widgets
KPICard- Key performance indicator cardsAreaChart- Area chart visualizationBarChart- Bar chart visualizationLineChart- Line chart visualizationDataTable- Sortable, filterable data tableActivityFeed- Recent activity timeline
App Features
APIKeyManager- API key creation and managementTeamManager- Team member managementBilling- Subscription and billing UIUserProfile- User profile settingsSettingsPage- App settings
Navigation
NavMain- Main navigation menuNavUser- User menu dropdownTeamSwitcher- Workspace/team switcherCommandPalette- Keyboard-driven command palette
Theme System
import { useThemeStore, ThemeScript } from '@mdxui/cockpit/themes'
// In your root layout
<ThemeScript />
// Toggle theme
const { theme, setTheme } = useThemeStore()Exports
// Main export
import { App, DeveloperDashboard } from '@mdxui/cockpit'
// Developer components
import { KPICard, DataTable } from '@mdxui/cockpit/developer'
// Auth pages
import { LoginPage, SignupPage } from '@mdxui/cockpit/auth'
// Theme utilities
import { useThemeStore, ThemeScript } from '@mdxui/cockpit/themes'Peer Dependencies
react^18.0.0 || ^19.0.0@mdxui/primitives- Base UI components@mdxui/themes- Theme systemmdxui- Core types and contracts
Links
License
MIT
