Skip to main content
BarcelonaJun 18 — Jun 24 · 6 days
  • FlightConfirmed
  • HotelConfirmed
  • TourNot booked
  • TransferNot booked
Open trip
Sign in Create account
  1. Home
  2. Shortcodes

Shortcodes

Every reusable block in the template, with the markup to copy.

Copy the markup, not a plugin.

There are no shortcodes to install: every block below is plain HTML with the template's own classes. Copy it into any page and it works.

Buttons

<button class="wu-btn wu-btn-primary">Primary</button>
<button class="wu-btn wu-btn-ghost">Ghost</button>
<button class="wu-btn wu-btn-outline wu-btn-lg">Outline, large</button>

Badges

Primary Secondary Success Danger
<span class="wu-badge wu-badge-success">Free cancellation</span>

Alerts

Booking confirmed

The voucher is on its way by email.

Only two rooms left

At this price, for these dates.

Payment declined

Your bank refused the charge. Nothing was taken.

<div class="wu-alert wu-alert-warning">
  <svg>…</svg>
  <div><strong>Heading</strong><p>Body copy.</p></div>
</div>

Form controls

This field is required.
<div class="wu-field">
  <label class="wu-label" for="id">Label</label>
  <input type="text" class="wu-input" id="id">
  <span class="wu-field-error"></span>
</div>

Counter

Guests
Adults and children
2
<div class="wu-counter" data-wu-counter data-min="1" data-max="9" data-label="guest">
  …
  <input type="hidden" name="guests" value="2">
</div>

Accordion

Answers animate from 0fr to 1fr, so nothing has to measure a height.

Add data-single to close the others.

<div data-wu-faq data-single>
  <div class="wu-faq">
    <div class="wu-faq-item">
      <button class="wu-faq-q" data-faq-q aria-expanded="false">Question</button>
      <div class="wu-faq-a"><div><p>Answer.</p></div></div>
    </div>
  </div>
</div>

Toasts

WayUgo.toast.success('Saved to your wishlist');
WayUgo.toast.error('Please check the highlighted fields.');

Price and rating

$310 $245 / night
4.7
<div class="wu-price">
  <span class="wu-price-was">$310</span>
  <span class="wu-price-amount">$245</span>
  <span class="wu-price-unit">/ night</span>
</div>

Breadcrumb

  1. Home
  2. Hotels
  3. Grand Marina Resort
<ol class="wu-breadcrumb">
  <li><a href="index.html">Home</a></li>
  <li>Current page</li>
</ol>

Step indicator

  1. Traveller details
  2. Payment
  3. Confirmation
<ol class="wu-steps">
  <li class="is-done"><span>Traveller details</span></li>
  <li class="is-active"><span>Payment</span></li>
  <li><span>Confirmation</span></li>
</ol>

The checkout flows set the classes themselves from data-step-offset; written by hand it is two class names.

Segmented control and tabs

<div class="wu-segmented" role="group" aria-label="Filter by service">
  <button type="button" class="is-active">All</button>
  <button type="button">Hotels</button>
</div>

The same control becomes tabs with role="tablist" on the wrapper and role="tab" plus aria-controls on each button - see pages/account/profile.html.

Pagination

<nav class="wu-pagination" aria-label="Results pages">
  <button type="button" class="is-current" aria-current="page">1</button>
  <button type="button">2</button>
</nav>

On a listing page the filter engine renders it into <nav class="wu-pagination" data-pagination></nav>.

Timeline

  1. 09:00Plaza Catalunya

    Meet your guide

    Look for the yellow umbrella by the fountain.

  2. 11:30Sagrada Familia

    Skip-the-line entry

    Ninety minutes inside, then the towers if you booked them.

<ol class="wu-timeline">
  <li class="is-highlight">
    <div class="wu-timeline-when"><strong>11:30</strong><span>Where</span></div>
    <span class="wu-timeline-dot" aria-hidden="true"></span>
    <div class="wu-timeline-body"><h3>What</h3><p>Detail</p></div>
  </li>
</ol>

Folded block

A long block - house rules, fare conditions, a privacy clause - folded to a readable height with the rest a click away.

  • Check-in from 15:00, check-out by 11:00.
  • Photo ID is needed at check-in for every guest.
  • Children of any age are welcome.
  • Cots are free; an extra bed is charged per night.
  • Pets are allowed on request, in ground-floor rooms only.
  • Smoking is not permitted anywhere indoors.
  • Parties and events are not allowed.
  • Quiet hours are 22:00 to 08:00.
  • Parking is on site and does not need booking.
  • The pool is open 07:00 to 21:00, unsupervised.
  • Breakfast is served 07:00 to 10:30 in the courtyard.
  • Damage deposits are pre-authorised, not charged.

The component measures the content first: a block that already fits gets no toggle at all, because offering one that reveals two lines is noise.

Keyboard and screen-reader behaviour comes free: the toggle is a real button with aria-controls and aria-expanded, and closing it scrolls the block back into view so the reader does not land halfway down the page.

<div class="wu-collapse" id="policy-body" data-collapse>...</div>
<button type="button" class="wu-collapse-toggle" data-collapse-toggle
        aria-controls="policy-body" aria-expanded="false"
        data-label-closed="Show all policies"
        data-label-open="Show fewer policies" hidden>
  <span>Show all policies</span>
</button>

Empty state

Nothing saved yet

The heart on any card keeps it here while you decide.

Browse stays
<div class="wu-empty">
  <h3>Nothing saved yet</h3>
  <p>Say what to do next, not that there is nothing.</p>
  <a class="wu-btn wu-btn-primary wu-btn-sm" href="#">Browse stays</a>
</div>

Tooltip

Pay later
<button class="wu-btn wu-btn-ghost wu-tooltip"
        data-tooltip="Free until 24 hours before arrival">Cancellation</button>

CSS only. Give a non-focusable element tabindex="0" so the tip is reachable from the keyboard.

Table

FareCabin bagChanges
Basic8 kgNot allowed
Flex8 kg + 23 kgFree
<div class="wu-table-scroll">
  <table class="wu-compare">...</table>
</div>

The wrapper is what stops a wide table pushing the whole page sideways on a phone.

Avatar

VT MO
<span class="wu-avatar">VT</span>
<span class="wu-avatar-mini">MO</span>

Initials come from WayUgo.account.initials(name); the mini one is what the header shows.

Service accent

Hotel Tour Flight Transfer
<article data-service="tour">…</article>
/* sets --wu-service on everything inside */