Command

Renders an unhighlighted code block, useful for one-liners or API Routes

Getlocalhost:9000/store/products
Was this example helpful?

Usage#


Code
import { Command } from "@medusajs/ui"
Code
1<Command>2  <code>yarn add @medusajs/ui</code>3</Command>

API Reference#


This component is based on the div element and supports all of its props

Usage Outside Medusa Admin#


If you're using the Command component in a project other than the Medusa Admin, make sure to include the TooltipProvider somewhere up in your component tree, as the Command.Copy component uses a Tooltip:

Code
1<TooltipProvider>2  <Command>3    <code>yarn add @medusajs/ui</code>4    <Command.Copy5      content="yarn add @medusajs/ui"6      className="ml-auto"7    />8  </Command>9</TooltipProvider>