opensourceui
GitHubTwitter/X
  1. Home
  2. Components
  3. Event
  4. Event Ticket
Back to Event

Components / Event

Event Ticket

Free Event React component — EventTicketCard. MIT licensed, copy-paste ready for Next.js and Tailwind CSS.

Perforated event ticket with a cover-image date block and VIP pass details on the right. Concert, conference, or launch night — same component.

Preview

Event cover image
Jun14
Live Event

Design Systems Conference 2026

10:00 AM — 6:00 PM
Kolkata, India
#DS2026-0042VIP Pass

Setup

How to use

Free for personal and commercial use. No UI attribution required. Include the MIT copyright notice when copying component source into your project. Read the MIT license.

  1. 1

    Run in your terminal:

    $npm install clsx tailwind-merge lucide-react
  2. 2

    Copy lib/cn.ts below. Skip if you already have cn().

  3. 3

    Copy the code below and create components/event/event-ticket-card.tsx in your project.

  4. 4

    Import and render:

    Example

    import { EventTicketCard } from "@/components/event/event-ticket-card";

    <EventTicketCard />

lib/cn.ts

1
2
3
4
5
6
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";
 
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}

components/event/event-ticket-card.tsx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
import { forwardRef, type ComponentPropsWithoutRef } from "react";
import Image from "next/image";
 
import { cn } from "@/lib/cn";
 
import { MapPin, Clock } from "lucide-react";
 
export type EventTicketCardProps = Readonly<
{
title?: string;
date?: string;
month?: string;
time?: string;
location?: string;
ticketId?: string;
ticketType?: string;
coverImageSrc?: string;
coverImageAlt?: string;
} & ComponentPropsWithoutRef<"div">
>;
 
// Production-ready Event Ticket component — styled with Tailwind CSS.
export const EventTicketCard = forwardRef<HTMLDivElement, EventTicketCardProps>(
(
{
className,
title = "Design Systems Conference 2026",
date = "14",
month = "Jun",
time = "10:00 AM — 6:00 PM",
location = "Kolkata, India",
ticketId = "#DS2026-0042",
ticketType = "VIP Pass",
coverImageSrc = "/wallpaper-3.png",
coverImageAlt = "Event cover image",
...props
},
ref,
) => {
return (
<div
ref={ref}
data-slot="event-ticket-card"
className={cn(
"group flex w-96 overflow-hidden rounded-2xl bg-neutral-50 font-sans",
className,
)}
{...props}
>
<div
data-slot="event-ticket-card-cover"
className="relative w-24 shrink-0 overflow-hidden"
>
<Image
src={coverImageSrc}
alt={coverImageAlt}
fill
sizes="96px"
className="object-cover"
/>
 
<div className="absolute inset-0 bg-teal-900/40" />
 
<div className="absolute inset-0 flex flex-col items-center justify-center text-white">
<span className="font-mono text-[10px] tracking-wider uppercase opacity-70">
{month}
</span>
 
<span className="text-2xl leading-none font-light">{date}</span>
</div>
</div>
 
<div
data-slot="event-ticket-card-content"
className="relative flex-1 p-4"
>
<div className="absolute top-3 bottom-3 left-0 w-px border-l border-dashed border-neutral-200" />
 
<div className="absolute -top-2 -left-2 h-4 w-4 rounded-full bg-white" />
 
<div className="absolute -bottom-2 -left-2 h-4 w-4 rounded-full bg-white" />
 
<span className="font-mono text-[10px] tracking-widest text-teal-600 uppercase">
Live Event
</span>
 
<h3 className="mt-1 text-sm leading-snug font-semibold text-neutral-900">
{title}
</h3>
 
<div className="mt-2 flex items-center gap-1.5 text-[11px] text-neutral-500">
<Clock size={10} />
<span>{time}</span>
</div>
 
<div className="mt-1 flex items-center gap-1.5 text-[11px] text-neutral-500">
<MapPin size={10} />
<span>{location}</span>
</div>
 
<div className="mt-3 flex items-center justify-between border-t border-neutral-100 pt-3">
<span className="font-mono text-[10px] text-neutral-400">
{ticketId}
</span>
 
<span className="text-xs font-semibold text-neutral-900">
{ticketType}
</span>
</div>
</div>
</div>
);
},
);
 
EventTicketCard.displayName = "EventTicketCard";
PreviousNext

On this

page

Jump to a section on this page.

  • lib/cn.ts
  • components/event/event-ticket-card.tsx

Sponsor spot · demo preview

Logo

Your brand name

Your tagline or category

A short pitch about your product or service goes here. This is a preview of how sponsor cards will look in this sidebar.

Your call to action

This slot is available. Sponsor Opensource UI and reach developers browsing components every day.