npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apiuikit/openapi-try-it-plugin

v0.3.1

Published

A "Try it out" request-sending plugin for apiuikit, filling the openapi.operation.tab slot.

Readme

OpenAPI Try it

npm version npm downloads License Docs

A "Try it out" plugin for apiuikit. Fill in parameters, auth, and a body, send the request, and inspect the response — from the docs.

This package is not bundled with apiuikit. Install it and pass it as a plugin.

Install

npm install @apiuikit/openapi-try-it-plugin

Peer dependencies: apiuikit ^1.7, React 18+.

Usage

Two layouts to register here, plus a third that apiuikit provides itself.

Keep the plugins array stable by defining it outside the component or with useMemo. A new array on every render re-registers the plugins and can reset the selected tab.

You can pass plugins to OpenAPI, OpenAPIRenderer, OpenAPIProvider, or a standalone section that receives a document prop. When a section is inside a provider, it uses the provider's plugins.

Tab (default)

Fills the openapi.operation.tab slot — a Try it tab next to the built-in Reference tab.

The Try it tab: request URL, parameters, auth, body, and Send

import { OpenAPI } from "apiuikit";
import tryItPlugin from "@apiuikit/openapi-try-it-plugin";
import "apiuikit/style.css";
import doc from "./openapi.json";

const plugins = [tryItPlugin];

export default function App() {
  return <OpenAPI openapi={doc} plugins={plugins} />;
}

Button

Fills the openapi.operation.reference.supplementary slot — a Try it row on the Path side panel. Clicking it opens a modal with the request on the left and the response on the right.

A Try it row on the Reference panel, between the example request and authorization

The Try it modal: request builder on the left, response on the right

import { OpenAPI } from "apiuikit";
import { createTryItButtonPlugin } from "@apiuikit/openapi-try-it-plugin";
import "apiuikit/style.css";
import doc from "./openapi.json";

const plugins = [createTryItButtonPlugin()];

export default function App() {
  return <OpenAPI openapi={doc} plugins={plugins} />;
}

Panel header — built into apiuikit

The header layout doesn't need this package. apiuikit ships it and loads it on demand:

import { OpenAPI } from "apiuikit";
import "apiuikit/style.css";
import doc from "./openapi.json";

const config = { show: { tryIt: true } };

export default function App() {
  return <OpenAPI openapi={doc} config={config} />;
}

That puts a compact Try it button in the operation panel's header, next to the close button, opening the same modal as the button layout above. It is off by default — see Configuration.

Install this package when you want a layout the built-in doesn't offer (a full tab, or a row inside the Reference panel), or when you need proxyUrl.

Several at once

import tryItPlugin, { createTryItButtonPlugin } from "@apiuikit/openapi-try-it-plugin";

const plugins = [tryItPlugin, createTryItButtonPlugin()];

Each entry point keeps its own request state — filling in parameters under one does not carry over to another. Registering more than one is supported, but one is usually what you want.

CORS

Requests go from the browser. If the API does not allow your origin, the browser will block them.

This package does not ship a proxy. If you have one, pass it:

import { createTryItPlugin } from "@apiuikit/openapi-try-it-plugin";

const plugins = [createTryItPlugin({ proxyUrl: "https://your-proxy.example.com/tryit" })];

Requests then go to ${proxyUrl}?target=<url-encoded API URL> instead of the API origin.

createTryItButtonPlugin accepts the same proxyUrl option. The built-in header layout does not take options — a host needing proxyUrl registers a plugin from this package instead.

Supported auth

| Scheme | Behavior | | --- | --- | | API key (header / query) | Input field | | HTTP Bearer | Token input | | HTTP Basic | Username + password | | OAuth2 client credentials | Fetches a token from the token URL | | OAuth2 authorization code (+ PKCE) | Login popup, then token exchange | | Other OAuth2 / OpenID Connect | Paste a token obtained elsewhere |

OAuth2 authorization-code redirect URIs must be same-origin with the page hosting apiuikit.

Cookie API keys cannot be sent from the browser (Cookie is a forbidden Fetch header).

Export

After building a request, export it as a Postman collection, an Insomnia collection, or a HAR file from the Export menu.

Development

npm install
npm run test
npm run typecheck
npm run build

Manual QA against the apiuikit playground: TESTING.md.