React API Explorer
Developers do not evaluate an API by reading about it — they call it. Put the console on the page itself: pick an endpoint, fill the parameters, see the response shape.
List provisioned devices
https://api.example.com/v1/devicesMax 100.
Simulated responses — this console does not call the API.
Installation
Props
| Prop | Type | Description |
|---|---|---|
| baseUrl | string | Prefix shown in the request preview |
| endpoints | ApiEndpoint[] | { id, method, path, summary, params?, sampleResponse } |
| onSend | (endpoint, values) => Promise<{ status: number; body: unknown }> | Perform the real call; omit to simulate |
| note | string | Footer copy under the response panel |
Path parameters are substituted into path by name — declare {id} in the path and a param named id with in: "path". Query params append automatically, so the URL preview always matches what would actually be sent.
Simulated or live — say which
With no onSend, the console is a simulator: it waits ~400 ms and returns the endpoint's sampleResponse. That is a legitimate thing to ship on a marketing page — you get the response shape without exposing an unauthenticated endpoint — but the footer says so, and you should leave that notice in place.
A console that appears to make live calls while replaying canned data is the fastest way to lose a developer's trust, and they will find out: the first thing a curious engineer does is open the network tab.
To go live, pass onSend:
Use a scoped, rate-limited demo token for this, never a real one — anything the browser can send, a visitor can read and reuse.
New components every week
Get the week's new Kelvin UI components and templates in one short email. No spam, unsubscribe anytime.