Skip to main content
Big news! Interval has been acquired by Meter. Learn more →

io.input.url

info

io.input.url is available on SDK versions v0.24.0 and higher.

Requests a URL.

The URL is validated on the client and an error is shown if the provided value is not a URL. You can perform additional URL validation by using the validation API.

Returns a URL object in Node.

Usage

const redirectUrl = await io.input.url("Redirect URL", {
helpText: "Please provide a URL for the redirect.",
placeholder: "https://example.com",
allowedProtocols: ["https"],
});

return redirectUrl.href;
interval.com

Props

allowedProtocols

Optional

array

Optional array of allowed protocols. Default are http and https.

defaultValue

Optional

string

Default value for the input.

disabled

Optional

boolean

Whether the input is disabled, preventing edits to the `defaultValue`.

helpText

Optional

string

Secondary label for providing additional context. Supports inline markdown elements like bold, italics, and links.

placeholder

Optional

string

Text to display in the input when no value is set.

Returns

URL

Did this section clearly explain what you wanted to learn?
On this page