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.
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)}
/>
This project is licensed under the MIT License. See LICENSE for details.