the open source API testing client for react
npm install @scalar/api-client-react



``bash`
npm install @scalar/api-client-react
First we need to add the provider, you should add it in the highest place you have a unique spec.
`tsx
import { ApiClientModalProvider } from '@scalar/api-client-react'
import '@scalar/api-client-react/style.css'
;
url: 'https://registry.scalar.com/@scalar/apis/galaxy?format=json',
}}>
{children}
`
Then you can trigger it from anywhere inside of that provider by calling the useApiClientModal()
`tsx
import { useApiClientModal } from '@scalar/api-client-react'
const client = useApiClientModal()
return (
)
``
Check out the playground for a working example.
We are API nerds. You too? Let's chat on Discord:
The source code in this repository is licensed under MIT.