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
idstring—Unique slide identifier for navigation
theme"light" | "dark""light"Color theme for the slide
dotNavTheme"light" | "dark"—Override theme for the DotNav indicator
centerboolean—Vertically center slide content
flushboolean—Remove default padding
heroboolean—Enable hero image layout
heroImagestring—URL for the hero background image
bgImagestring—URL for a subtle background image
photoboolean—Photo-optimized layout
classNamestring—Additional CSS class
childrenReactNode—Slide content