Skip to content

Sticky mobile call bar

A bar pinned to the bottom of mobile screens with Call and Directions buttons and a live open-now status, built for trades and local shops.

  • Tailwind
  • React
  • CSS
  • WordPress
Open in a new tab

Description

Below 768 px, the bar stays at the bottom of the screen with two large touch targets: a tel: link that dials the number and a directions link that opens the phone's maps app. It works out from the opening hours whether the business is open and, if not, when it reopens ("Closed, opens Monday at 8"), then refreshes every minute. It respects notches with env(safe-area-inset-*), reserves its height at the end of the page so nothing is hidden, and disappears on desktop where the number and address are already visible.

Accessibility: a named "Contact rapide" aside region, native links reachable by keyboard with a 3 px focus outline, 56 px tall targets, AA contrast measured in light and dark, the open status given by text and not by colour alone, and no transitions with prefers-reduced-motion. Without JavaScript both buttons work; only the open status is hidden.

Code

Loading the code…

The code of this component in

Archive contents

bouton-appel-mobile-fixe-html-tailwind.zip3 files · 6 Ko

  • index.html9 Ko
  • README.md4 Ko
  • LICENSE.md1 Ko

Tags

Updated on December 3, 2026.

Reviews

No reviews yet.

In the same spirit

  • A row of buttons to share the page on Facebook, LinkedIn, WhatsApp or by email, with a copy-link button and no third-party script.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Toggle heart buttons that count favourites, remember them between visits and announce them to screen readers.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A button that adds an event to Google Calendar, Outlook or any calendar through an .ics file, with no third-party service.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A button that copies an IBAN, a reference, an address or a promo code and confirms "Copied", on screen and to screen readers.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component