⚛️

React API Reference

Estimated reading time: 15 min

Complete reference for Narro components and hooks.

Presentation Props

PropTypeDefaultDescription
aspectRatio"16:9" | "4:3" | "21:9""16:9"Slide aspect ratio
keyboardbooleantrueEnable keyboard navigation
mousebooleantrueEnable mouse navigation
touchbooleantrueEnable touch navigation
routingbooleantrueEnable URL routing

Hooks

tsx
import { useSlide, usePresentation, useFragment } from "@reactslides/core";

// Get current slide info
const { currentSlide, totalSlides, goToSlide } = usePresentation();

// Get slide-specific info
const { isActive, slideIndex } = useSlide();

// Fragment control
const { visible, index, total, next, prev } = useFragment();