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-unfurlThe preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.
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.
oxyn add link-unfurlUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
Examples
Unfurl
A pasted link shimmers, then unfurls into a card.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Inline
Folded to the inline title; click to open.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
No preview
No preview: the link stays plain.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
Manual
Auto expand off: links gain only their title.
Code Pro
The preview is free. Pro opens the code of every Pro component, screen and template.
API reference
LinkUnfurl
| Prop | Type | Default | Description |
|---|---|---|---|
textrequired | String | — | Message text. |
linksrequired | Vec<Unfurl> | — | Links in the message. |
nowrequired | ClockMs | — | Shared clock. |
label | String | "Message #lisbon-offsite" | Field label / placeholder. |
on_input | EventHandler<String> | — | Text changed. |
on_toggle | EventHandler<usize> | — | Card folded or opened. |
on_remove | EventHandler<usize> | — | Link removed. |
on_send | EventHandler<()> | — | Send. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Enter | Send |
| ShiftEnter | New line |
| Tab | Inline 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
LinkUnfurlfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
LinkUnfurlElinoxyn_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.