UIR

SuccessTicket

A receipt-style ticket for a successful purchase. It drops in, a party popper bursts confetti, the details rise in one by one, and the barcode prints under a scan line. Notched sides and a scalloped edge make it look torn from a roll.

Preview

Preview coming soon

Try it live: run the CLI command below in an Expo app, or open the Code tab.

Installation

npx @codewithrabby/ui@latest add success-ticket

Usage

import { SuccessTicket } from "@/components/uir/success-ticket";

<View style={{ flex: 1, backgroundColor: "#f1f4fa", justifyContent: "center", alignItems: "center" }}>
  <SuccessTicket
    backgroundColor="#f1f4fa" // same as the screen, so the notches look cut out
    title="Thank you!"
    subtitle="Your ticket has been issued successfully"
    details={[
      { label: "TICKET ID", value: order.id },
      { label: "Amount", value: "$35.00" },
      { label: "DATE & TIME", value: "19 Jun 2025 • 10:15" },
    ]}
    payment={{ name: "Liana Tudakova", detail: "•••• 8237" }}
    barcode="2 8937261 273610"
  />
</View>

Props

PropTypeDefault
title

Heading under the emoji.

string"Thank you!"
subtitle

Text under the title.

string"Your ticket has been issued…"
details

Shown in two columns: left, right, left, right…

{ label, value }[]—
payment

Card / payment method row.

{ name, detail, icon? }—
barcode

Digits under the barcode; the bars are generated from it. Leave out to hide the barcode.

string—
emoji

Big emoji that bounces and bursts confetti.

string"🎉"
backgroundColor

Must match the screen behind so the notches look cut out.

string"#f1f4fa"
width

Ticket width.

number300
confettiColors

Confetti colours.

string[]—