Skip to content
animorio
IT
All components

Get tickets stage button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 9.7 KBGSAP 28 KBFreeDownload the zip

The button to buy concert tickets, made of frosted glass on a violet black, like a Dribbble shot: behind the glass two stage lights, one lilac and one rose, sway slowly and come out of the top edge as faint rays. On hover the lights turn towards the pointer; pressed, they dim like the house lights; while it finds the seats they sweep across each other and a line of light fills the stage edge; when the seats are held the two beams cross over the middle, the ticket turns into a check and the price rolls to the total.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Get tickets stage button" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The get tickets button with the stage lights behind the glass</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the ticket button of a concert venue: a pill of frosted glass with two stage lights behind it, one lilac and one
         rose, that sway slowly and come out of the top of the glass in faint rays. On hover they turn to follow the
         pointer; pressed, they dim like the house lights; while the seats are found they sweep across each other and a
         line of light fills the stage edge; when the seats are held they cross on the middle and the glass lights up -->
    <div class="tk" data-wrap>
      <span class="tk__rays" aria-hidden="true">
        <span class="tk__ray tk__ray--a" data-ray></span>
        <span class="tk__ray tk__ray--b" data-ray></span>
      </span>
      <span class="tk__spill" data-spill aria-hidden="true"></span>
      <button class="tk__btn" type="button" data-btn data-autoclic aria-label="Get tickets">
        <span class="tk__glass" data-glass>
          <span class="tk__base" aria-hidden="true"></span>
          <span class="tk__lights" data-lights aria-hidden="true">
            <span class="tk__beam tk__beam--a" data-beam></span>
            <span class="tk__beam tk__beam--b" data-beam></span>
            <span class="tk__spot" data-spot></span>
            <span class="tk__haze" data-haze></span>
          </span>
          <span class="tk__shine" data-shine aria-hidden="true"></span>
          <span class="tk__frost" aria-hidden="true"></span>
          <span class="tk__rim" data-rim aria-hidden="true"></span>
          <span class="tk__floor" aria-hidden="true"><span class="tk__floor-fill" data-floor></span></span>
          <span class="tk__row">
            <span class="tk__well" data-well aria-hidden="true">
              <span class="tk__lit" data-lit></span>
              <svg class="tk__icon" viewBox="0 0 24 24">
                <g data-ticket>
                  <path class="tk__ticket" d="M4.5 7.2A1.7 1.7 0 0 1 6.2 5.5h11.6a1.7 1.7 0 0 1 1.7 1.7v2.1a2.7 2.7 0 0 0 0 5.4v2.1a1.7 1.7 0 0 1-1.7 1.7H6.2a1.7 1.7 0 0 1-1.7-1.7v-2.1a2.7 2.7 0 0 0 0-5.4z"/>
                  <path class="tk__perf" d="M14.6 6.6v10.8"/>
                  <path class="tk__lines" d="M7.6 10.2h4.3M7.6 13.8h2.9"/>
                </g>
                <path class="tk__check" data-check d="M7.4 12.4l3.1 3.1 6.2-6.6" pathLength="1"/>
              </svg>
            </span>
            <span class="tk__words">
              <span class="tk__stack" aria-hidden="true">
                <span class="tk__label" data-label>Get tickets</span>
                <span class="tk__label" data-label>Finding seats</span>
                <span class="tk__label tk__label--done" data-label>Seats held</span>
              </span>
              <span class="tk__stack" aria-hidden="true">
                <span class="tk__sub" data-sub>Nova Arena · Fri 14 Nov</span>
                <span class="tk__sub" data-sub>Best available · 2 seats</span>
                <span class="tk__sub" data-sub>Row F · Seats 12, 13</span>
              </span>
            </span>
            <span class="tk__chip" data-chip aria-hidden="true">
              <span class="tk__cur">€</span><span class="tk__num" data-num><span class="tk__val" data-val>48</span></span>
            </span>
          </span>
        </span>
      </button>
    </div>
    <p class="sr" aria-live="polite" data-live></p>
  </main>
  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

24 values to change

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Get tickets stage button” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a black with a violet veil, a very fine grain and just a pink shade at the bottom, alone in the middle, there is a pill button 60 pixels tall made of frosted glass: the top edge catches the light in one pixel, the bottom one stays in shadow. Behind the glass there are two stage lights, two cones of light starting from just under the bottom edge, a lilac one on the left and a rose one on the right, that barely cross and sway slowly, each on its own rhythm; where they leave the glass the top edge takes their colour, and above the button they go on as two very faint rays that fade after a short way, while on the floor underneath a lilac and rose glow spreads. Inside the glass a thin haze drifts slowly and the beams light it up. On the left there is a dark well whose edge takes the two colours, with a drawn ticket inside and its dotted tear line; then the words Get tickets, in small type underneath Nova Arena · Fri 14 Nov, and on the right the price in a chip of clearer glass, € 48. With the mouse over it, the two lights turn towards the pointer like two follow spots tracking it, they get brighter, a soft light follows the pointer inside the glass and the ticket tilts. Pressed, the glass sinks by a pixel and narrows, the well a little more, and the lights dim like the house lights before the show; on release everything springs back. Then the words become Finding seats with Best available · 2 seats underneath, the two lights sweep the hall crossing out of step and along the bottom edge a line of light from lilac to rose fills from left to right. When the seats are held the two beams land on the middle and cross there, a pool of light opens under them, the ticket shrinks and a check draws itself in its place, the well, the chip and the glass swell by a hair and spring back, the words become Seats held with Row F · Seats 12, 13 and the price rolls up to the total, € 96. After a few seconds the light closes, the lights go back to their place, the ticket comes back and the price rolls back down. Until someone touches it, the button goes round by itself.

How it works

The glass in layers

The button is a single box moved only by GSAP; inside, absolute layers with overflow hidden and the same radius: a dark base, the lights with the haze, the light under the pointer (a radial-gradient on two CSS variables moved by gsap.quickTo), a pane with a feTurbulence grain and three inner shadows for the one pixel edge, and on top the edge that takes the colour of the lights.

The stage lights

Each light is a div with its transform-origin at the bottom centre and mix-blend-mode screen, so where they cross the light adds up; the cone is two conic-gradients starting from the pivot, a wide coloured one and a narrow lighter one for the core of the beam, with soft sides given by the degrees of the gradient itself, and a mask-image that fades it towards the top. The pivot sits 14 pixels under the bottom edge, so the glass only shows the part that opens. A longer copy of each light sits behind the button, with a mask-image that shows it only above the top edge: those are the rays.

One object and one ticker

Where each light aims, how much it sways and how bright it is live in a single object; GSAP moves its numbers (quickTo for the pointer, a looping timeline for the seat search, a back.out for the cross on the middle) and a single gsap.ticker adds two sines per light and writes the rotation of the lights and the rays, the opacity and two CSS variables for the edge.

The point on the edge

The point where the axis of a light crosses the top edge is worked out on every frame with the tangent of the angle times the distance from the pivot; it becomes a CSS variable in percent and a radial-gradient two and a half pixels tall lights the edge of the glass there, so it follows the beams.

The follow and the total

On hover the angle of each light is atan2 between the pivot and a point 30 pixels above the pointer, limited to 46 degrees, so the two beams reach it from below like two follow spots. The price is a grid stack: the old number leaves with yPercent minus 100 and the new one comes from 100 with a back.out, the other way round when it goes back to the price of one.

Values to change

NameFileDefaultWhat it changes
EVENTscript.jsNova Arena · Fri 14 NovThe small line under Get tickets.
PRICEscript.js48The price of one ticket, in euro.
SEATSscript.js2How many seats are held.
FINDscript.js1.6How many seconds it takes to find the seats.
HOLDscript.js3.2How many seconds the held seats stay on the button.
GLOWscript.js1How strong the stage lights are.
SWAYscript.js1How much the lights sway at rest: 0 still, 2 restless.
SPRINGscript.js1How springy the press and the words are: 0.4 calm, 2 very bouncy.
AUTOscript.jstrueThe button goes round by itself until someone touches it.

Try them in the Playground

When to use it

For the buy button of a site for concerts, theatres, festivals and box offices: the event page or the summary before paying, with the search for the best seats and the held seats told inside the button itself. It also works for a club, a cinema or a live music night in a hotel.

On phones

On the phone the button is at most 88% of the screen wide and the rest is the same; there is no hover, so the lights stay in their place and the light under the finger turns on at the touch.

With reduced motion

The lights stay still and do not sway: they only change in brightness, the haze does not drift, the stage line fills, the pool of light, the check and the ticket swap with a fade, the words and the price change in place.

Pitfalls

  • With the pivot of the lights inside the glass the cones showed as two sharp fake triangles at the bottom: the pivot is 14 pixels under the edge and only the already open part of the beam enters the glass.
  • Aimed straight at the pointer, the lights had to turn almost 80 degrees when the pointer was on the opposite side and the beam vanished sideways: they aim 30 pixels above the pointer and the angle is limited to 46 degrees.
  • The lights turned with a tween for each state plus the sway in another tween: the two overwrote each other. Now the tweens only move the numbers of one object and a single ticker adds the sway and writes the rotation.
  • The cones cut with clip-path had hard sides like slabs, and with filter blur to soften them vertical lines showed up in the glass: now the sides fade by themselves inside two conic-gradients, with no filter at all.
  • The haze was a repeated texture drifting with background-position and the seam between two tiles crossed the glass like a line: now it is a single image larger than the glass that drifts slowly with x and y.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 9.7 KB; the libraries: GSAP 28 KB.

Testing

Tested on 3 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All components