Redocly API Block - With Y-Scroll Offset

Configure the Redocly API Block with a vertical scroll offset to account for fixed headers or navigation elements.

Overview

The scrollYOffset parameter adjusts scroll behavior when navigating to anchors within the API documentation (default: 0). Setting a scroll offset is essential when you have:

Without this offset, anchor links might scroll content underneath fixed elements, making it partially hidden.

Syntax

<RedoclyAPIBlock src="path/to/openapi.yaml" scrollYOffset={64} />

Parameters

Example

data-src=../../assets/openapi.yaml