Shopware Design

URL Field

Source

Usage

URL Field is a single-line input for entering and normalizing a web address such as external links, landing pages, or reference URLs stored in forms. Use it when the value should point to a website or route, and when protocol handling like https:// and http:// should stay visible and easy to change.

import { MtUrlField } from "@shopware-ag/meteor-component-library";

Examples

Disabled

Error

Hint

API reference

Props

PropTypeDefault
omit-url-hashboolean
omit-url-searchboolean
copyableboolean
error{ detail: string; }
labelstring
requiredboolean
is-inheritance-fieldboolean
is-inheritedboolean
help-textstring
disabledboolean
placeholderstring
namestring
size"default" | "small""default"
model-valuestring

Events

EventPayload
update:modelValue[value: string | undefined]
change[value: string]
inheritance-remove[]
inheritance-restore[]

Slots

SlotBindings
suffixany
hintany

Best practices

Do
  • Use a clear label such as Website or Target URL.
  • Add help text when users need rules about valid links or allowed domains.
  • Enable copyable when users often reuse the saved URL elsewhere.
Don't
  • Do not use URL Field for general text input.
  • Do not ask users to type the full protocol if the field already helps manage it.
  • Do not use it for multiple links in one field.

Behavior

  • URL Field uses a native type="url" input and keeps the protocol toggle visible beside the input.
  • The component normalizes entered URLs and can omit search parameters or hashes when configured.
  • copyable adds a quick way to copy the current URL from the field.

Accessibility

  • Always provide a visible label so users know what kind of link is expected.
  • Keep help text specific when only certain URLs or domains are allowed.
  • Make sure the final saved URL is understandable if the protocol toggle changes the output value.
  • Text Field: when the value is general text and should not be normalized as a URL.