Plug & play theming
CSS custom properties cascade from VitePress or any Vue 3 design system. No config, no overrides — it just fits in.
A drop-in Vue 3 component that turns any endpoint into a live, themeable playground. Zero runtime dependencies. ~8 KB JS gzipped.
npm install vue-api-playground// docs/.vitepress/theme/index.ts
import DefaultTheme from 'vitepress/theme'
import { Playground } from 'vue-api-playground'
import 'vue-api-playground/styles'
export default {
extends: DefaultTheme,
enhanceApp({ app }) {
app.component('VueApiPlayground', Playground)
},
}<VueApiPlayground
url="https://api.example.com/posts/{id}"
method="get"
:data="[{ name: 'id', value: '1', type: 'number' }]"
/>Traditional API docs are static. Readers leave the page to test anything — Postman, curl, a scratch file. Vue API Playground collapses that loop: readers execute requests, edit parameters, and inspect responses without leaving your documentation.
It's the successor to vuepress-api-playground, rebuilt for Vue 3 and modern VitePress sites.