Create Api Key

Inline form to name and create an API key, with a labelled input and a Create key button that passes the name to your handler. Pairs with the key list.

src/registry/ui/create-api-key.tsx/r/create-api-key.json

Installation#

bash
npx shadcn@latest add @minidev/create-api-key

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/create-api-key.json

Usage#

tsx
import { CreateApiKey } from "@/components/ui/create-api-key"

export function Example() {
  return <CreateApiKey />
}

API reference#

CreateApiKey props
PropTypeDefault
classNamestring-
onCreate(name: string) => void-

Dependencies#

npm

React only
All Developer tool UI components for React