Skip to content

App Layout

Arrange a header, sidebars, content, and footer in one application shell.

Demos

Skip to content
IPEX workspace

The main region contains the current task.

Workspace footer

Usage

vue
<script setup lang="ts">
import { Accordion } from '~/components/ui/accordion'

const items = [
  { value: 'source', label: 'Do I own the source?', content: 'Yes. Copy and adapt the files.' },
]
</script>

<template>
  <Accordion :items="items" />
</template>

Workspace layout

AppLayout has IPEX styling for the header, footer, side regions, and skip link. Use the left slot for navigation. Set viewport to false when a parent supplies the height, as these embedded previews do.

Skip to content
IPEX workspace

Projects

2 projects
vue
<AppLayout :viewport="false" scroll="page">
  <template #header>Workspace</template>
  <template #left><ProjectNavigation /></template>
  <ProjectList />
  <template #footer>2 projects</template>
</AppLayout>

Inspector layout

Add a right region for details that belong beside the current task. The layout prop controls which regions the header and footer span.

Skip to content
IPEX workspace

Projects

2 projects
vue
<AppLayout :layout="{ header: 'full', footer: 'content' }">
  <template #left><ProjectNavigation /></template>
  <ProjectList />
  <template #right><ProjectDetails /></template>
</AppLayout>

Installation

Complete the shared installation. Copy AppLayout.vue and index.ts into app/components/ui/app-layout/.

API

Props

PropTypeDefaultDescription
asstring | Component"div"Outer root element.
mainAsstring | Component"main"Content element; use a native tag for the exposed focus helper.
layoutAppLayoutConfigSee belowRegion span and side placement. Partial objects keep defaults for omitted keys.
scroll"content" | "page""content"Independent main scrolling or document flow.
viewportbooleantrueDynamic viewport height in content mode; minimum viewport height in page mode.
stickyHeaderbooleanfalseSticky header in page mode.
stickyFooterbooleanfalseSticky footer in page mode.
stickySidesbooleanfalseSticky inline sides in page mode.
stickyLeftbooleanstickySidesOverride stickiness for the inline left side in page mode. Explicit false disables it.
stickyRightbooleanstickySidesOverride stickiness for the inline right side in page mode. Explicit false disables it.
safeAreabooleantrueOuter device safe-area padding. Consumer padding utilities can override it.
mainIdstringGeneratedMain ID and skip-link target. Keep explicit IDs unique.
mainLabelstring-Accessible name on content element.
skipLinkbooleantrueRender the keyboard skip link.
skipLabelstring"Skip to content"Skip-link text, including localization.
uiAppLayoutUi-Classes for generated parts.

Slots

All five slots receive mainId: string, resolved layout: Required<AppLayoutConfig>, and scroll: AppLayoutScroll. Slots supply content inside generated region wrappers. Omitted region slots produce no wrappers. Slot-owned controls retain their own event handlers and accessibility.