UrlInput
Una dirección web. Si la persona no escribe https://, se agrega al salir del campo.
import { UrlInput } from '@sypnia/ui/react'
En esta página
Un webhook
Escribe «example.com» y pulsa Tab.
We send a POST here when a row changes.
Código
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>;
} Cuándo usarlo
Úsalo cuando
- Webhooks, sitios web, direcciones de retorno.
No lo uses cuando
- Rutas dentro de una app: usa CodeInput.
Para todos
- En celulares se abre el teclado de direcciones; la corrección ortográfica está apagada.
Props
| UrlInput | Tipo | Por defecto |
|---|---|---|
onValueChange | ((url: string) => void) | |
size | "sm" | "md" | "lg" |