Toggle Sidebar B
AppearanceLight & dark mode D

Tear Ticket

Ticket whose perforated stub tears off by hand: paper bridges stretch into fibres and snap one by one from the far end, the torn edges are jagged and fit each other, the freed stub dangles and drops, and the body is stamped as used. The artwork tilts in 3D with parallax on hover.

Default

Grab the stub and pull it away from the body. Let go early and it springs back. Use the corner button to bring it back.

Dark previewReplay previewOpen in new tab
Visitors in a walkway of coloured glass
Spectrum14 Nov
Admit one Rooftop gallery
Until 30 Nov
No. 284619

Customize

Orientation
Width460
Height250
Stub Size150
Radius16
Holes12
Hole Size6
Notch3
Roughness0
Tear Angle30
Stretch30
Resistance0.45
Rotate4
Tilt Max9
Tilt Reach260
Parallax6
Perspective1000
Background
Color
Border Width1

API Reference

TearTicket

PropTypeDefaultDescription
imagestring''Artwork behind the body. It shifts against the tilt for parallax and turns grey once used.
imageAltstring''Alt text for the artwork.
scrimbooleantrueA fade from the paper colour up over the artwork, so text stays readable on busy images.
imageRadiusnumber8Corner radius of the artwork panel, in px. Set it to the ticket radius minus 8 to stay concentric.
orientation'horizontal' | 'vertical''horizontal'Horizontal puts the stub on the right. Vertical puts the artwork on top and the stub at the bottom.
tornbooleanundefinedControlled state, usable with v-model:torn. Set it back to false to restore the stub.
defaultTornbooleanfalseStart already used.
widthnumber460Ticket width in px. It scales down to fit a narrower parent.
heightnumber250Ticket height in px.
stubSizenumber150Size of the stub along the ticket, in px: its width when horizontal, its height when vertical.
radiusnumber16Outer corner radius in px.
holesnumber12Perforation holes along the tear line.
holeSizenumber6Hole diameter in px.
notchnumber3Radius of the notches at both ends of the tear line.
roughnessnumber0Optional jitter of the torn line between holes, in px. 0 keeps the edge perfectly straight and symmetrical.
tearAnglenumber30Degrees of pull at which the last bridge gives way and the stub comes free.
stretchnumber30How far a paper bridge stretches before it snaps, in px. Bridges far from the hinge reach it first.
resistancenumber0.45How much the intact fibres hold the stub back, 0 to 1. The pull eases as bridges give way, so the paper fights hardest at the start.
rotatenumber4A resting tilt of the whole ticket in the page plane, in degrees.
tiltbooleantrueThe ticket leans toward the cursor in 3D.
tiltMaxnumber9Largest tilt angle in degrees.
tiltReachnumber260How far beyond the ticket the pointer still steers the tilt, in px. The tilt tracks the whole page.
parallaxnumber6How far the artwork travels against the tilt, in px.
perspectivenumber1000Viewing distance in px.
backgroundstring'#27272a'Paper colour, also used by the fibres.
colorstring'#f5f5f5'Text colour.
borderbooleantrueA hairline drawn along the cut edge of each piece, following every hole and notch.
borderColorstring''Colour of that hairline. Empty derives a faint tint of the text colour.
borderWidthnumber1Thickness of the hairline in px.
stubBackgroundstring''Stub paper colour. Empty follows background.
recenterbooleantrueOnce the stub is gone, the remaining ticket glides over to sit centred in its original box.
disabledbooleanfalseDimmed and inert.
ariaLabelstring'Tear off the stub'Accessible name of the stub. Enter or Space tears it.
EventDescription
tearFires once the stub has come free and gone.
update:tornSame moment as tear, with true.
SlotDescription
defaultContent of the ticket body.
stubContent of the tear-off stub.

Accessibility

Keyboard shortcuts and ARIA behavior.

Shortcut Description
Enter + SpaceOn the stub, tears it off at once.
  • The stub is a button. Once it is gone it is hidden from assistive technology and a status region says the ticket is used.
  • With prefers-reduced-motion a short pull tears the stub off without the paper physics, and the tilt is off.