Sidebar month and layers — Calendar block
Procalendar-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-layersUsage
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.
| Prop | Type | Description |
|---|---|---|
| title | string | Wordsthe panel’s heading ("My calendars"); without it the month names the panel |
| month* | Month | the small month calendar and the chosen day |
| groups* | Group[] | Datathe calendars the person can show, in groups |
| select | string | Actionthe page of a day; the record carries the date as id |
| toggle | string | Actionshows or hides a calendar: the host receives `{ id, visible }` and shows it in the page’s calendar |
| create | Create | the create action: its words and the page action it runs |
| options | Options | the block’s settings: layout choices and secondary words, read by every variant |
Month month · 6 props
| Prop | Type | Description |
|---|---|---|
| selected* | string | Designthe chosen day, YYYY-MM-DD; its month (or its week) is the one shown |
| today | string | Designtoday as the host knows it, YYYY-MM-DD, to mark it |
| marked | string[] | Datathe days with something planned in the shown calendars, YYYY-MM-DD, as the host counted them |
| previous | string | Actionthe previous month (or week) |
| next | string | Actionthe next month (or week) |
| current | string | Actionback to today |
Group groups[] · 3 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe calendar’s id in the app |
| label* | string | Wordsthe group’s name ("My calendars", "Team") |
| calendars* | Calendar[] | the calendars in this group, each with its colour |
Calendar groups[].calendars[] · 4 props
| Prop | Type | Description |
|---|---|---|
| id* | string | number | Datathe calendar’s id in the app |
| label* | string | Wordsthe calendar’s name |
| tone* | 'brand' | 'info' | 'success' | 'warning' | 'danger' | 'neutral' | the colour its events take in the calendar view |
| checked* | boolean | shown in the calendar view now |
Create create · 2 props
| Prop | Type | Description |
|---|---|---|
| label* | string | Words"New calendar" |
| action* | string | Actiona named action of the page |
Options options · 2 props
| Prop | Type | Description |
|---|---|---|
| weekStart | 'mon' | 'sun' | the first day of a week; Monday by default |
| mood | 'inverse' | 'brand' | 'warm' | 'tint' | string | a 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).
| Member | What it is for |
|---|---|
| href | the address an action leads to, or null to hide what leads there |
| act | runs a change (subscribe, add to cart, save) and answers { ok } or { ok: false, error } |
| can | whether the page has this action |
| Link | your router’s link component |
| cartCount | the cart badge’s number |
| cartDrawer | whether your app has a cart drawer |
| cartOpen | whether the cart drawer is open |
| label | your 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:
| Key | English | French |
|---|---|---|
| newsletter.already | You are already subscribed. | Vous êtes déjà inscrit. |
| newsletter.done | Done: you are subscribed. | C’est noté : vous êtes inscrit. |
| newsletter.invalid | Check the email address. | Vérifiez l’adresse e-mail. |
| newsletter.tooMany | Too 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
calendarsfrom 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.