Files
stack/packages/mosaic/framework/skills/slidev/references/layout-global-layers.md
T
fargo 1a822493ba format: apply repo prettier (3.8.1) to the folded skills tree
963 markdown files reformatted with the repository's pinned prettier so
pnpm format:check covers the folded tree like every other repo file.

The formatter's embedded-language pass also normalized code fences
(TS semicolons, closed HTML tags in examples, lowercased CSS hex colors,
one renumbered list that skipped an index). Alphanumeric token deltas vs
the fold commit were audited file-by-file; all are formatter-equivalent
markup normalizations plus the four sanitized skills.
2026-08-19 14:37:17 -05:00

1.1 KiB

name, description
name description
global-layers Create components that persist across slides like footers and backgrounds

Global Layers

Create components that persist across slides.

Layer Files

Create in project root:

  • global-top.vue - Above all slides (single instance)
  • global-bottom.vue - Below all slides (single instance)
  • slide-top.vue - Above each slide (per-slide instance)
  • slide-bottom.vue - Below each slide (per-slide instance)
  • custom-nav-controls.vue - Custom navigation controls

Z-Order (top to bottom)

  1. NavControls / custom-nav-controls.vue
  2. global-top.vue
  3. slide-top.vue
  4. Slide Content
  5. slide-bottom.vue
  6. global-bottom.vue
<!-- global-bottom.vue -->
<template>
  <footer class="absolute bottom-0 left-0 right-0 p-2">Your Name</footer>
</template>

Conditional Rendering

<!-- Hide on cover layout -->
<template>
  <footer v-if="$nav.currentLayout !== 'cover'" class="absolute bottom-0 p-2">
    {{ $nav.currentPage }} / {{ $nav.total }}
  </footer>
</template>

Export Note

Use --per-slide export option when global layers depend on navigation state.