url
A URL string slot.
A URL string slot. accepts names a single link kind (such as "tour") or
link-provider id (such as "matterport") the value must match. A link kind
with no provider behind it admits no url at all, which the type cannot say —
check time rejects those.
Binding-only: no fill decision produces a url, so this builder takes no
fill — the value comes from source.
Import from @homepages/template-kit.
Signature
Section titled “Signature”function url<const HasSource extends SlotSource | ComputeBinding<unknown> | undefined = undefined>(opts: UrlOptions & { source?: HasSource; } & WritebackOption<HasSource>): UrlSlotDef & SourceMark<HasSource>Parameters
Section titled “Parameters”| Name | Type | Required | Description |
|---|---|---|---|
opts |
UrlOptions & { source?: HasSource } & WritebackOption<HasSource> |
required |
Returns
Section titled “Returns”UrlSlotDef & SourceMark<HasSource>
Example
Section titled “Example”import { url } from "@homepages/template-kit";
url({ label: "Tour URL", accepts: "tour" });