Layout Components
Layout Components
Section titled “Layout Components”Layout components provide structure and navigation for the application.
Application Layouts
Section titled “Application Layouts”AdminLayout
Section titled “AdminLayout”Admin-specific layout with full navigation.
Location: src/layouts/AdminLayout.vue
<template> <AdminLayout> <router-view /> </AdminLayout></template>CompanyLayout
Section titled “CompanyLayout”Tenant/company-specific layout.
Location: src/layouts/CompanyLayout.vue
<template> <CompanyLayout> <router-view /> </CompanyLayout></template>WorkspaceLayout
Section titled “WorkspaceLayout”Workspace-focused layout.
Location: src/layouts/WorkspaceLayout.vue
<template> <WorkspaceLayout> <router-view /> </WorkspaceLayout></template>Structural Components
Section titled “Structural Components”Header
Section titled “Header”Application header with navigation and user menu.
Location: src/components/Header/
<template> <AppHeader :user="currentUser" @logout="handleLogout" /></template>SideBar
Section titled “SideBar”Navigation sidebar with menu items.
Location: src/components/SideBar/
<template> <SideBar :items="menuItems" :collapsed="isCollapsed" @toggle="toggleSidebar" /></template>Layout Patterns
Section titled “Layout Patterns”Page Layout
Section titled “Page Layout”<template> <div class="page-layout"> <HeaderView title="Page Title" description="Description"> <template #actions> <Button label="Action" /> </template> </HeaderView>
<div class="page-content"> <!-- Page content --> </div> </div></template>Split Layout
Section titled “Split Layout”<template> <Splitter class="h-screen"> <SplitterPanel :size="20"> <SideBar :items="menuItems" /> </SplitterPanel> <SplitterPanel :size="80"> <router-view /> </SplitterPanel> </Splitter></template>Grid Layout
Section titled “Grid Layout”<template> <div class="grid grid-cols-12 gap-4"> <div class="col-span-3"> <!-- Sidebar content --> </div> <div class="col-span-9"> <!-- Main content --> </div> </div></template>PrimeVue Layout Components
Section titled “PrimeVue Layout Components”| Component | Usage |
|---|---|
Splitter / SplitterPanel | Resizable panels |
ScrollPanel | Scrollable content |
Panel | Collapsible container |
Card | Content card |
Divider | Visual separator |
Fieldset | Grouped content |
Responsive Design
Section titled “Responsive Design”Breakpoints
Section titled “Breakpoints”Using Tailwind CSS breakpoints:
| Breakpoint | Size | Class Prefix |
|---|---|---|
| sm | 640px | sm: |
| md | 768px | md: |
| lg | 1024px | lg: |
| xl | 1280px | xl: |
| 2xl | 1536px | 2xl: |
Example
Section titled “Example”<template> <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4"> <Card v-for="item in items" :key="item.id"> <!-- Card content --> </Card> </div></template>