Back to Primitives

UrlField

1:1Forms
View on GitHub

URL-specific text input.

Example
Usage
import { UrlField } from '@/components/polaris';

function Example() {
    return <UrlField label="Website" placeholder="https://example.com" />;
}
Component Source
import { forwardRef, createElement } from 'react';

type Props = JSX.IntrinsicElements['s-url-field'];

/**
 * UrlField component - text input for URLs.
 *
 * @example
 * <UrlField label="Website" placeholder="https://example.com" />
 */
export const UrlField = forwardRef<HTMLElement, Props>((props, ref) => createElement('s-url-field', { ref, ...props }));

UrlField.displayName = 'UrlField';