Redoc Svelte

A drop-in Svelte component for Redoc.

pnpm add redoc-svelte
yarn add redoc-svelte
npm install redoc-svelte

[!IMPORTANT] redoc-svelte is not compatible with SvelteKit v1, please use v2 instead.

Usage

For more examples, see the Redoc documentation.

<script>
  import { RedocStandalone } from 'redoc-svelte';
</script>

<RedocStandalone
  specUrl="https://redocly.github.io/redoc/openapi.yaml"
  options={{
    nativeScrollbars: true,
    theme: { colors: { primary: { main: '#dd5522' } } },
  }}
  on:loaded={e => console.log('loaded', e?.detail)}
/>

License

This project is licensed under the MIT License. See LICENSE for details.

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes