Skip to content

Signature Library · Indian

Bus Ticket Roll

Pick a fare stage: the conductor's punch makes a hole and the fare changes.

Sends a change event with the picked fare.

States

  • Default

  • Hover

  • Active

  • Focus

Code

bus-ticket.html

<div class="sig-bus-ticket" role="group" aria-label="City Bus Service">
  <span class="sig-bus-ticket__stages">
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 1, ₹5" data-fare="5">1</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 2, ₹8" data-fare="8">2</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 3, ₹10" data-fare="10">3</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="true" aria-label="Stage 4, ₹12" data-fare="12">4</button>
  </span>
  <span class="sig-bus-ticket__mid">
    <span class="sig-bus-ticket__title">City Bus Service</span>
    <span class="sig-bus-ticket__serial">No. A 048213</span>
    <span class="sig-bus-ticket__total" data-total aria-live="polite">₹12</span>
    <span class="sig-bus-ticket__small">Keep till the end</span>
  </span>
  <span class="sig-bus-ticket__stages">
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 5, ₹15" data-fare="15">5</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 6, ₹20" data-fare="20">6</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 7, ₹25" data-fare="25">7</button>
    <button class="sig-bus-ticket__stage" type="button" aria-pressed="false" aria-label="Stage 8, ₹30" data-fare="30">8</button>
  </span>
</div>

More in Indian