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-cardGive $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 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
- 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
- Replays a multi-agent run on one clock: use Agent timeline instead.
- One model at a glance: use Model card instead.
- A small automation on a single rail: use AI workflow instead.
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.
oxyn add referral-cardUsage
The preview is free. Pro opens the code of every Pro component, screen and template.
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 preview is free. Pro opens the code of every Pro component, screen and template.
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 preview is free. Pro opens the code of every Pro component, screen and template.
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 preview is free. Pro opens the code of every Pro component, screen and template.
API reference
ReferralCard
| Prop | Type | Default | Description |
|---|---|---|---|
nowrequired | ClockMs | — | Host clock. |
simulate | bool | true | Play the sample program (friends sign up and subscribe). |
fail | bool | Default::default() | The first send fails (error scenario). |
list | bool | true | Show the invite list. |
Read from the Rust signature and doc comments.
Keyboard interactions
| Key | Action |
|---|---|
| Tab | Copy, the share buttons, the email field, Send |
| Enter · comma · space · Tab | Make 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.
| Transition | Duration | Easing |
|---|---|---|
| Send | 900 ms | — |
| Simulated steps | 2.6 s, 4.8 s, 7 s, 9.4 s | — |
| Stage swap | 160 ms crossfade | ease-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
ReferralCardfromoxyn_dioxusand includeSTATUS_INDICATOR_CSSplus the token stylesheet once. - A GPUI version exists:
AiKitViewinoxyn_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.