MtUrlField component provides a specialized input for URLs with automatic protocol handling and optional SSL toggle.
Import
Props
v-model binding for the URL value.
Label text for the URL field.
Placeholder text displayed when empty.
Disables the URL field.
Marks the field as required.
The name attribute for the input.
The size of the field.
Adds a copy button to copy the URL to clipboard.
Removes the hash (#) portion from the URL.
Removes the query string (?) portion from the URL.
Help text with additional information.
Error object with a detail property.
Indicates if the value is inherited.
Enables inheritance functionality.
Events
Emitted when the URL value changes.
Emitted when the input loses focus.
Emitted when inheritance is removed.
Emitted when inheritance is restored.
Slots
Content displayed after the input.
Additional hint content below the field.
Usage
Basic URL Field
With SSL Toggle
Copyable URL
Omit Query Parameters
Small Size
With Validation
With Suffix
Features
Protocol Toggle
The URL field includes a visual toggle button showing a lock icon:- Locked (HTTPS): Green lock icon, uses
https://protocol - Unlocked (HTTP): Gray lock icon, uses
http://protocol
Automatic Formatting
- Removes multiple slashes from protocol
- Trims trailing slashes (unless hash or search is present)
- Decodes URI components for display
- Validates URL structure
Accessibility
- Uses native URL input type
- Protocol toggle button has descriptive aria-label
- Label properly associated with input
- Error messages linked via aria-describedby
- Copy button accessible via keyboard
- Focus visible outline for keyboard navigation
- Disabled state prevents interaction