Sidebar month and layers — Calendar block

Pro

calendar-sidebar-month-and-layers · for app, calendar pages

Sidebar month and layers

The side pane beside a calendar view: a mini month to pick the day, then the calendars in folding groups with a checkbox each

Documentation

Installation

One command copies the block into your project with the shadcn CLI (the registry is set once: Installation).

pnpm dlx shadcn-vue@latest add @trame/calendar-sidebar-month-and-layers

Usage

Its demo data, shortened (Using blocks).

<script setup lang="ts">
import CalendarSidebarMonthAndLayers from '@/components/trame/blocks/calendar/calendar-sidebar-month-and-layers.vue'

const props = {
title: "Salon calendar",
month: {
selected: "2026-10-15",
today: "2026-10-14",
marked: [
"2026-10-02",
"2026-10-05"
],
previous: "previous",
next: "next",
current: "today"
},
groups: [
{
id: "mine",
label: "My calendars",
calendars: [
{
id: "rdv",
label: "Client appointments",
tone: "brand",
checked: true
},
{
id: "atelier",
label: "Studio",
tone: "success",
checked: true
}
]
},
{
id: "team",
label: "Team",
calendars: [
{
id: "lea",
label: "Leah Marchand",
tone: "info",
checked: true
},
{
id: "samir",
label: "Samir Benali",
tone: "warning",
checked: false
}
]
}
],
select: "day",
toggle: "toggle-calendar",
create: {
label: "New calendar",
action: "create-calendar"
}
}
</script>

<template>
<CalendarSidebarMonthAndLayers v-bind="props" />
</template>

Props

Each prop says who changes it: Words, Picture, Action, Design, Data.* required.

PropTypeDescription
titlestringWordsthe panel’s heading ("My calendars"); without it the month names the panel
month*Monththe small month calendar and the chosen day
groups*Group[]Datathe calendars the person can show, in groups
selectstringActionthe page of a day; the record carries the date as id
togglestringActionshows or hides a calendar: the host receives `{ id, visible }` and shows it in the page’s calendar
createCreatethe create action: its words and the page action it runs
optionsOptionsthe block’s settings: layout choices and secondary words, read by every variant
Month month · 6 props
PropTypeDescription
selected*stringDesignthe chosen day, YYYY-MM-DD; its month (or its week) is the one shown
todaystringDesigntoday as the host knows it, YYYY-MM-DD, to mark it
markedstring[]Datathe days with something planned in the shown calendars, YYYY-MM-DD, as the host counted them
previousstringActionthe previous month (or week)
nextstringActionthe next month (or week)
currentstringActionback to today
Group groups[] · 3 props
PropTypeDescription
id*string | numberDatathe calendar’s id in the app
label*stringWordsthe group’s name ("My calendars", "Team")
calendars*Calendar[]the calendars in this group, each with its colour
Calendar groups[].calendars[] · 4 props
PropTypeDescription
id*string | numberDatathe calendar’s id in the app
label*stringWordsthe calendar’s name
tone*'brand' | 'info' | 'success' | 'warning' | 'danger' | 'neutral'the colour its events take in the calendar view
checked*booleanshown in the calendar view now
Create create · 2 props
PropTypeDescription
label*stringWords"New calendar"
action*stringActiona named action of the page
Options options · 2 props
PropTypeDescription
weekStart'mon' | 'sun'the first day of a week; Monday by default
mood'inverse' | 'brand' | 'warm' | 'tint' | stringa band of the page that redefines the theme surfaces inside it
What it asks your app for

The block never knows your app: it asks it, through one context provided once, where its links lead, what its actions do, how a price reads and which words to say (The host context).

MemberWhat it is for
hrefthe address an action leads to, or null to hide what leads there
actruns a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error }
canwhether the page has this action
Linkyour router’s link component
cartCountthe cart badge’s number
cartDrawerwhether your app has a cart drawer
cartOpenwhether the cart drawer is open
labelyour word for an interface key, or undefined to keep the block’s own

The words it says itself, in English and French; label(key) replaces any of them:

KeyEnglishFrench
newsletter.alreadyYou are already subscribed.Vous êtes déjà inscrit.
newsletter.doneDone: you are subscribed.C’est noté : vous êtes inscrit.
newsletter.invalidCheck the email address.Vérifiez l’adresse e-mail.
newsletter.tooManyToo many attempts, try again in a moment.Trop de tentatives, réessayez dans un moment.

Features

  • Every word in the server HTML
  • Same markup in Vue and React
  • Theme tokens only: every theme, light and dark
  • Shows what you give it, invents nothing
  • No motion; still under reduced motion
  • Real buttons and links, a visible focus
  • Asks your app through actions: month.previous, month.next, month.current, select, calendar.layer, create
  • Reads calendars from your app

A calendar section, for app, calendar pages; it uses @lucide/vue, @vueuse/core, class-variance-authority, clsx, reka-ui, tailwind-merge.

Built with

The components this block is made of; each one installs on its own too.

More calendar blocks

  • Booking agenda by day: a plain list grouped by day: the compact view and the one that reads best on a phone.
  • Day: one day on an hour axis with its events wide, and the day’s list beside it on wide screens, for a full day of appointments.
  • Month: a month at a glance with its busy days, the month’s agenda beside or under it.
  • Slot picker slots: an appointment page: the free slots of a day to pick from, not a full calendar.
  • Team schedule columns: one day of a team or rooms: a column per person on a time axis, to see who is free when.
  • Timeline gantt: Task rows on a shared supplied time axis, using the merchant's own dates and progress only.
  • Timeline journal: A vertical dated journal for the merchant’s own milestones and delivery notes, without a time-axis grid.
  • Timeline list first: A readable task list with proportional bars and date labels, using the merchant's own schedule only.

All 14 calendar blocks