HandleInput - Admin Components

Note: This component is available since Medusa v2.21.0.

The HandleInput component is a text input with a leading slash, which shows the user that the value is a URL segment. The Medusa Admin uses it in the forms of records that have a handle, such as products, collections, and categories.

Code
import { HandleInput } from "@medusajs/dashboard/components"

Example#

Use HandleInput as the control of a Form field, as shown in the Forms guide:

Code
1import {2  Form,3  HandleInput,4} from "@medusajs/dashboard/components"5
6const HandleField = ({ control }) => {7  return (8    <Form.Field9      control={control}10      name="handle"11      render={({ field }) => (12        <Form.Item>13          <Form.Label14            optional15            tooltip="Used in the brand's URL."16          >17            Handle18          </Form.Label>19          <Form.Control>20            <HandleInput {...field} />21          </Form.Control>22          <Form.ErrorMessage />23        </Form.Item>24      )}25    />26  )27}

The slash is decorative, so the field's value doesn't include it.


Props#

HandleInput accepts the same props as the Input UI component, including the following:

Loading...

HandleInput also accepts every other prop of the Input component, such as size and id, along with the attributes of a native input element.

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵