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-ticketUsage
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
| Prop | Type | Default |
|---|---|---|
titleHeading under the emoji. | string | "Thank you!" |
subtitleText under the title. | string | "Your ticket has been issued…" |
detailsShown in two columns: left, right, left, right… | { label, value }[] | — |
paymentCard / payment method row. | { name, detail, icon? } | — |
barcodeDigits under the barcode; the bars are generated from it. Leave out to hide the barcode. | string | — |
emojiBig emoji that bounces and bursts confetti. | string | "🎉" |
backgroundColorMust match the screen behind so the notches look cut out. | string | "#f1f4fa" |
widthTicket width. | number | 300 |
confettiColorsConfetti colours. | string[] | — |