Skip to content
↑↓ to navigate↵ to openesc to close

Menu

Preview

JFMAMJJASONDYear’21’22’23’24’25

Install

Add it with your package manager, or copy the source manually.

Run it in a project set up with shadcn-vue. The source is copied to components/beui and its dependencies are added to your package.json. Read the shadcn-vue guide

bunx --bun shadcn-vue@latest add @beui-vue/returns-calendar

Import the shared styles once in your application.

TSUsage
import ReturnsCalendar from '@/components/beui/charts/ReturnsCalendar.vue'
import '@/components/beui/styles.css'

API Reference

ReturnsCalendar

years?
readonly number[]

Row labels, one per row of `returns`.

Default[]
returns?
readonly (readonly number[])[]

`returns[year][month]` in percent, twelve months per row.

Default[]
class?
string
Default—
v-model:selection?
ReturnsCalendarSelection | null

Controlled selection; null clears it.

Defaultundefined
defaultSelection?
ReturnsCalendarSelection | null
Default—
labels?
Partial<ReturnsCalendarMessages>

Override any built-in string.

Default—
@selection-change?
(range: ReturnsCalendarProps['selection']) => void
Default—
#default?
slot

Compose `ReturnsCalendarGrid` (with `ReturnsCalendarTooltip` inside); omit it for the complete chart.

Default—

ReturnsCalendarGrid

class?
string
Default—
#default?
slot

Overlay content rendered inside the grid, normally `ReturnsCalendarTooltip`.

Default—

ReturnsCalendarTooltip

class?
string
Default—
#default?
{ data: ReturnsCalendarTooltipData }

Custom tooltip content for the hovered month, year, or the span being previewed.

Default—

Updated