Skip to content
Back

Link unfurlPro

A message field where a pasted link shimmers while it resolves, then unfurls into a preview card (site, title, description, image) that folds back to an inline link or is removed.

oxyn add link-unfurl
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • A composer where a pasted URL (found with find_urls) shimmers on its host while it resolves, then unfurls into a preview card (favicon, site, title, description, image) — or, with auto expand off, gains only its favicon and title and opens on click.
  • A card folds back to the inline link or is removed (the link stays as text).
  • Enter sends (Shift+Enter is a new line).
  • The demo offers sample links as Paste buttons, autoplays the first one, and has a speed multiplier for the simulated fetch.

When not to use

  • Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
  • The model menu of an AI chat: use Model Picker instead.
  • The prompt box for an agent, in six layouts: use Composer instead.

Installation

Link unfurl is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add link-unfurl

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Unfurl

A pasted link shimmers, then unfurls into a card.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Inline

Folded to the inline title; click to open.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

No preview

No preview: the link stays plain.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Manual

Auto expand off: links gain only their title.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

LinkUnfurl

PropTypeDefaultDescription
textrequiredString—Message text.
linksrequiredVec<Unfurl>—Links in the message.
nowrequiredClockMs—Shared clock.
labelString"Message #lisbon-offsite"Field label / placeholder.
on_inputEventHandler<String>—Text changed.
on_toggleEventHandler<usize>—Card folded or opened.
on_removeEventHandler<usize>—Link removed.
on_sendEventHandler<()>—Send.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
EnterSend
ShiftEnterNew line
TabInline links, Collapse, Remove, Send

Accessibility

  • The field is a labelled textarea; card buttons are named Collapse preview / Remove preview.
  • Sending announces in a status line.
From the spec
  • Labelled textarea; card buttons are named; Send is named Send message.

Motion & interaction

Timing
  • The card rises in over 200 ms; the morph from the inline link is a fade + rise, not the source's clip unroll.
  • Reduced motion: no entrance rise or row stagger, no shimmer (static muted text), chevrons and the card morph jump to their end state.

Responsive behaviour

  • Cards cap at 420 px and shrink with the composer.
Edge cases (spec)
  • Cards cap at 420 px.

Notes for AI

  • Import LinkUnfurl from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: LinkUnfurlEl in oxyn_gpui.
  • Props to set first: text, links, now.
  • It reads a clock (now) for live timers; pass one clock for the whole page rather than one per component.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI