You are viewing beta documentation for Hyper 3.x.
Reference

Link Type Settings

Each link type on a Hyper field has a definition stored in field settings (project config): handle, label, enabled state, type-specific options (sources, placeholders), and a field layout for link attributes.

Editors see the layout when creating a link in the CP. In templates, attribute values live on the hydrated Link object.

PropertyDescription
labelCP label for this link type in the type switcher.
handleStable identifier. Used in content JSON (linkTypeHandle), GraphQL type names, and multisite propagation. Built-in types use a short, read-only type key (url, entry, …). Custom instances generate an editable handle from their label. The settings builder includes a copy button for programmatic saves.
enabledWhether editors can select this type.
isCustomWhether this row is a custom instance (e.g. a second Entry type scoped to one section).

Type-specific settings (element sources, selection label, URI filters, selectable element conditions for Entry/Asset/User, etc.) are stored on the definition and exposed on the registry link type class. See Link Types for built-in types.

Selectable element conditions

Entry, Asset, and User link types support Craft’s Selectable {Type} Condition builder — the same HTMX condition UI as native Entries/Assets/Users fields.

  • Configured per link type under field settings, or via link type configs.
  • Applied to the CP element select modal and multi-link bulk-add picker.
  • Stored as selectionCondition on the link type definition in project config.

Sources still limit where you pick from; the condition limits which elements within those sources are selectable.

Native layout fields

These field layout elements ship with Hyper. Add them per link type under Settings → Fields → [Hyper field] → Link Types → [type] → Link Fields.

Layout fieldLink attributeTemplate accessNotes
LinklinkValuelinkValue, type-specific helpersType-specific input (URL field, element selector, etc.). Value serializes into linkValue.
Link TextlinkTextlinkText, text, customLinkTexttext applies layout defaults and element title fallback; customLinkText is author input only.
Link TitlelinkTitlelinkTitleHTML title attribute.
Aria LabelariaLabelariaLabelHTML aria-label attribute. Not in the default layout — add via the field layout designer.
ClassesclassesclassesHTML class attribute.
Url SuffixurlSuffixurlSuffixAppended to resolved URL (?query, #fragment, path segments).
Custom AttributescustomAttributescustomAttributesArbitrary HTML attributes (name/value pairs).
New WindownewWindownewWindow, targetLightswitch in the layout. Not in the default layout (same as ARIA Label). When added, the header icon is hidden for that link type. Field setting Enable New Window in Header must still be on.
Embed PreviewCP-only preview for Embed link types.

Custom Craft fields and UI elements can be added to the layout. Values serialize into the link’s custom field content keyed by layout element UID.

Layout tabs

Fields on each field-layout tab appear in the CP as Vizy/Neo/Matrix-style header tabs when there is more than one tab. Authors switch panes inline; there is no settings slide-out for layout tabs.

Where to put linkValue

Keep the primary Link (linkValue) field on the first tab. That is the main authoring surface. Moving linkValue to a later tab makes empty or incomplete links easy to miss.

Use additional tabs for secondary attributes (URL Suffix, classes, custom fields), not for the core target value.

Shared link type suites live in Link Type Configs. Fields pick a named config or Custom for field-owned link types.