Skip to content
Back

Referral cardPro

Both sides win: share your personal link or post it, add friends' addresses as chips, then follow each one from invited to joined to paying while your credit climbs and a bonus tier unlocks.

oxyn add referral-card

Give $20, get $20

Friends get $20 off their first month, and you get $20 in credit when they subscribe.

Press Enter or comma after each address

Invited
5
Signed up
3
Earned
$40

2 more paid referrals for 3 months of Pro free

  • dev@quillworks.ioInvitedNov 18
  • Lena Ortizlena@ortiz.studioInvitedNov 15
  • Tomas Vargatomas@vargadesign.coSigned upNov 9
  • Sam Okorosam@okoro.devEarned $20Nov 2
  • Hana Satohana@satolabs.jpEarned $20Oct 27
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

  • Run a give-and-get referral program from one card: share the link, invite by email, see who joined and what was earned.

When not to use

Installation

Referral card 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 referral-card

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

Program

Friends sign up and subscribe; the milestone unlocks.

Give $20, get $20

Friends get $20 off their first month, and you get $20 in credit when they subscribe.

Press Enter or comma after each address

Invited
5
Signed up
3
Earned
$40

2 more paid referrals for 3 months of Pro free

  • dev@quillworks.ioInvitedNov 18
  • Lena Ortizlena@ortiz.studioInvitedNov 15
  • Tomas Vargatomas@vargadesign.coSigned upNov 9
  • Sam Okorosam@okoro.devEarned $20Nov 2
  • Hana Satohana@satolabs.jpEarned $20Oct 27
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

Compact

No list, no simulation (Oxyn extra).

Give $20, get $20

Friends get $20 off their first month, and you get $20 in credit when they subscribe.

Press Enter or comma after each address

Invited
5
Signed up
3
Earned
$40

2 more paid referrals for 3 months of Pro free

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

Send fails

The first send fails and keeps the chips.

Give $20, get $20

Friends get $20 off their first month, and you get $20 in credit when they subscribe.

Press Enter or comma after each address

Invited
5
Signed up
3
Earned
$40

2 more paid referrals for 3 months of Pro free

  • dev@quillworks.ioInvitedNov 18
  • Lena Ortizlena@ortiz.studioInvitedNov 15
  • Tomas Vargatomas@vargadesign.coSigned upNov 9
  • Sam Okorosam@okoro.devEarned $20Nov 2
  • Hana Satohana@satolabs.jpEarned $20Oct 27
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

ReferralCard

PropTypeDefaultDescription
nowrequiredClockMs—Host clock.
simulatebooltruePlay the sample program (friends sign up and subscribe).
failboolDefault::default()The first send fails (error scenario).
listbooltrueShow the invite list.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabCopy, the share buttons, the email field, Send
Enter · comma · space · TabMake the typed address a chip
Enter (empty field)Send the chips
Backspace (empty field)Remove the last chip

Accessibility

  • Share buttons are named icon buttons (Post on X, Share in Slack, Share by email).
  • The helper line below the field describes it and is read when it changes; a bad address flips the field to invalid and adds a warning glyph.
  • Each invite's progress has a glyph plus a label; the bonus bar is a named image and its goal is also written out.
From the spec

Share buttons are named icon buttons; the hint is a polite status tied with aria-describedby and sets aria-invalid on errors; stages are icon plus word. Every action returns the line the polite live region announces. The focus outline shows only for keyboard focus.

Motion & interaction

Enter, comma, space or Tab turns an address into a chip; Backspace on an empty field removes the last; stages change with a crossfade; milestone segments fill and turn green when reached.

Timing

Everything on screen is derived from the host clock now (no timers in the component), so playback, tests and the GPUI view agree.

TransitionDurationEasing
Send900 ms—
Simulated steps2.6 s, 4.8 s, 7 s, 9.4 s—
Stage swap160 ms crossfadeease-out

Reduced motion: loops and travel stop; each state shows its end pose and its words.

Responsive behaviour

  • Grows to 560 px; on narrow cards the post-to buttons move onto a line of their own.
  • Long addresses are cut with an ellipsis but dates stay readable; extra chips scroll horizontally inside the input.
Edge cases (spec)

Up to 560 px; under 470 px (container query) share buttons take their own row and emails hide behind names. Chips scroll sideways inside a fixed-height field. Checked at 1440, 768 and 390 px in light and dark with no text overlap. Chrome is monochrome grey; colour is semantic only (success, warning, danger, info) plus the official coloured brand and model marks.

Notes for AI

  • Import ReferralCard from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
  • A GPUI version exists: AiKitView in oxyn_gpui.
  • Props to set first: 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