@scalar/api-client-modal
v0.0.16
Published
A modal wrapper around the API Client
Downloads
2,996
Keywords
Readme
Scalar Draggable component
Installation
npm install @scalar/api-client-modal
Usage
import { createScalarApiClient } from '@/api-client-modal'
// Initialize
const { open } = await createScalarApiClient(document.getElementById('root'), {
spec: {
url: 'https://cdn.jsdelivr.net/npm/@scalar/galaxy/dist/latest.json',
},
})
// Open the API client right-away
open()
// Or: Open a specific operation
// open({
// method: 'GET',
// path: '/me',
// })
You can find this example in the playground folder.