For Tailwind CSS v3 docs, click here.

Spring Calendar

An animated calendar widget that expands to reveal events and features smooth, spring‑based Motion‑V transitions.

API

Prop 名称类型默认值描述
calendarDataArray<{ month: string; date: number; day: string; events?: { title: string; day: string; time: string }[] }>Array defining each calendar day and its optional events. Required.
initialIndexnumber0Day index initially selected.

Emits

EventPayload描述
update:activeIndexnumberFires when a day button is clicked, emitting the new active index.

通过 CLI 安装

npm
pnpm
bun
yarn
npx shadcn-vue@latest add "https://registry.inspira-ui.com/spring-calendar.json"

手动安装

复制并粘贴以下代码:

SpringCalendar.vue
TextMorph.vue

功能特性

  • Spring Animations — Uses MotionConfig to apply realistic spring/bounce transitions when height changes.
  • Dynamic Height — The outer card automatically grows to fit event listings.
  • TextMorph Integration — Day labels morph smoothly via the TextMorph sub‑component.
  • Interactive Day Picker — Clickable day chips with hover/press scale effects.
  • Responsive Layout — Flexbox layout that wraps chips and events neatly.

感谢