Skip to content
Calm motion: animations on this site only fade, with no movement

Opening hours ​

The hours of each day of the week, and "Open now"

Shows when a shop, a studio, or a help desk is open. A line at the top shows the state now and the time of the next change. For the free times of one day to book, use the slot picker.

Basic
Monday
9:00 AM–6:00 PM
Tuesday
9:00 AM–6:00 PM
Wednesday
9:00 AM–6:00 PM
Thursday
9:00 AM–6:00 PM
Friday
9:00 AM–10:00 PM
Saturday
10:00 AM–2:00 PM7:00 PM–1:00 AM
Sunday
Closed
  • hours is a list of seven days, Monday first. Each day is a list of shifts, each with an open and a close time as HH:MM. An empty day is closed.
  • A day can have two or more shifts. A shift with a close at or before its open ends on the next day, such as 19:00 to 01:00.
  • time-zone is the zone of the place, such as Asia/Jakarta. The status and "today" use the time there, not the time of the reader.
  • The status shows after the page loads and changes every minute, because the server does not know the time of the reader. now sets a fixed moment, for example in a test.
  • Open has a filled dot and closed a hollow dot, with words. locale sets the language of the days and the times (default English).
  • Change the words with labels or a label pack: title, open, closed, today, and the functions closesAt and opensAt.

Usage ​

ts
import { BlessOpeningHours } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
hours*BlessWeekHours—
timeZonestring—the time zone of the place, for example `Asia/Jakarta`; default: the zone of the reader
localestring"en"the language of the days and times, for example `id`
nownumber | Date—a fixed moment, for example in a test
labelsPartial<{ title: string; open: string; closed: string; closesAt: (time: string) => string; opensAt: (day: string, time: string) => string; today: string; }>—

Released under the MIT License. Character names and artwork belong to their owners.