VisorVisor
ComponentsDeck

Slide

A full-viewport slide container with theme support, hero images, and background images.

Features

  • Theme-aware dark/light modes — automatically adjusts text and background colors
  • Hero image with overlay — set hero and heroImage for a full-bleed image with gradient
  • Background image support — subtle background via bgImage
  • Centered layout — optional center prop for vertically centered content
  • Flush mode — removes default padding for edge-to-edge layouts
  • CSS Modules with Visor tokens — consistent spacing, color, and typography

Installation

npx visor add slide

Usage

import { Slide } from '@/components/deck/slide/slide';

export default function Example() {
  return (
    <Slide id="intro" theme="dark" center>
      <h1>Welcome</h1>
      <p>Your presentation starts here.</p>
    </Slide>
  );
}

API Reference

PropTypeDefaultDescription
idstringUnique slide identifier for navigation
theme"light" | "dark""light"Color theme for the slide
dotNavTheme"light" | "dark"Override theme for the DotNav indicator
centerbooleanVertically center slide content
flushbooleanRemove default padding
herobooleanEnable hero image layout
heroImagestringURL for the hero background image
bgImagestringURL for a subtle background image
photobooleanPhoto-optimized layout
classNamestringAdditional CSS class
childrenReactNodeSlide content