Runable v1.0.0-alpha.20
Why Runable? Docs Modules Work with AI Blog About Changelog
  • 01Why Runable?
  • 02Docs
  • 03Modules
  • 04Work with AI
  • 05Blog
  • 06About
  • 07Changelog
Vue without a fixed server runtime.
Getting Started Structure Integrations Guide MCP API
  • Getting Started Structure Integrations Guide MCP API
Build the Interface
  • Routing
  • Layouts
  • Middlewares
  • Error Handling
Load and Render
  • Data Fetching
  • SSR and CSR
  • Head and SEO
Extend Runable
  • Auto-imports
  • Plugins
  • Modules
Configure and Ship
  • Runtime Configuration
  • CSS and Assets
  • Production Build
CLI
  • Overview
  • Create
  • Prepare
  • Build
  • MCP
  • AI Skills
  • Inspector

Layouts

Share an interface structure across pages without duplicating templates.

A layout wraps page content. Use it for primary navigation, a sidebar, or a structure specific to one application area.

Create the default layout

<!-- app/layouts/default.vue -->
<template>
  <div class="shell">
    <header>My application</header>
    <main><slot /></main>
  </div>
</template>

Every page uses default unless it declares another layout.

Select a layout

<!-- app/pages/admin/index.vue -->
<script setup lang="ts">
definePageMeta({ layout: "admin" });
</script>

<template>
  <h1>Administration</h1>
</template>

Runable then looks for app/layouts/admin.vue.

Pass properties

Declare an object to pass props to the layout:

<script setup lang="ts">
definePageMeta({
  layout: {
    name: "dashboard",
    props: { compact: true },
  },
});
</script>
<!-- app/layouts/dashboard.vue -->
<script setup lang="ts">
defineProps<{ compact?: boolean }>();
</script>

<template>
  <div :class="{ compact }"><slot /></div>
</template>

Disable the layout

definePageMeta({ layout: false });

The page content is then rendered directly.

Layout not found

If the name matches no loaded layout, Runable displays the page without a wrapper. Check the file name and layout value.

Report an issue Edit this page
Routing

Create application routes from files in app/pages.

Middlewares

Allow, block, or redirect navigation before displaying a page.

On this page

  • 1Create the default layout
  • 2Select a layout
  • 3Pass properties
  • 4Disable the layout
Runable

The Vue framework that brings productive conventions to any backend.

Product

  • Why Runable
  • Documentation
  • Installation
  • Integrations

Project

  • About
  • Blog
  • Changelog
  • Sponsor

Community

  • GitHub
  • Issues
  • Discussions
  • Bluesky

© 2026 Runable. Released under the MIT License.

Open source Built with Vue and Runable