UrlInput
A web address. If the person leaves out https://, it is added when they leave the field.
import { UrlInput } from '@sypnia/ui/react'
On this page
A webhook
Write «example.com» and press Tab.
We send a POST here when a row changes.
Code
import { Field, UrlInput } from '@sypnia/ui/react';
// Write «example.com» and leave the field: https:// is added.
export default function Webhook() {
return <Field label="Webhook address" hint="We send a POST here when a row changes."><UrlInput defaultValue="" /></Field>;
} When to use it
Use it when
- Webhooks, websites, callback addresses.
Do not use it when
- Paths inside an app: use CodeInput.
For everyone
- The URL keyboard opens on phones; spelling fixes are off.
Props
| UrlInput | Type | Default |
|---|---|---|
onValueChange | ((url: string) => void) | |
size | "sm" | "md" | "lg" |