npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@calends/vue

v0.5.0

Published

Headless Vue calendar primitives, styled with data attributes. Ships no CSS.

Readme

@calends/vue

Headless Vue calendar primitives from Calends: month, week and day time grid, resource, timeline, and Gantt views, with drag, resize, and range select. They ship no CSS. State is exposed as data attributes and layout as CSS custom properties, so you style them with Tailwind (data-today:…) or plain attribute selectors.

npm install @calends/vue @calends/core

vue 3.5+ is the only peer dependency. as and as-child work as they do in Reka UI.

Requirements

  • A runtime with native Temporal. No polyfill is bundled.
  • For types, TypeScript 6.0 or later with ESNext (or esnext.temporal) in lib.

Example

<script setup lang="ts">
import { ref } from 'vue';
import {
    CalendarHeading,
    CalendarNav,
    CalendarRoot,
    EventBar,
    MonthDay,
    MonthGrid,
    MonthWeek,
    MonthWeekday,
} from '@calends/vue';

const date = ref(Temporal.Now.plainDateISO());
const events = [
    { id: 1, title: 'Offsite', start: '2026-10-12', end: '2026-10-14' },
    { id: 2, title: 'Standup', start: '2026-10-15T09:00:00', end: '2026-10-15T09:15:00' },
];
</script>

<template>
    <CalendarRoot
        v-model:date="date"
        :events="events"
        :max-lanes="4"
    >
        <header class="flex items-center gap-2">
            <CalendarNav action="prev">Previous</CalendarNav>
            <CalendarHeading />
            <CalendarNav action="today">Today</CalendarNav>
            <CalendarNav action="next">Next</CalendarNav>
        </header>

        <MonthGrid v-slot="{ weekdays, weeks }">
            <div
                role="row"
                class="grid grid-cols-7"
            >
                <MonthWeekday
                    v-for="weekday in weekdays"
                    :key="weekday.dayOfWeek"
                    :date="weekday"
                />
            </div>

            <MonthWeek
                v-for="week in weeks"
                :key="week.start.toString()"
                :week="week"
                class="grid grid-cols-7"
            >
                <MonthDay
                    v-for="day in week.days"
                    :key="day.date.toString()"
                    :day="day"
                    class="relative min-h-28 data-outside:opacity-50 data-today:font-bold"
                >
                    {{ day.date.day }}

                    <EventBar
                        v-for="segment in day.segments"
                        v-slot="{ event }"
                        :key="segment.event.id"
                        :segment="segment"
                        class="absolute top-[calc(1.75rem+var(--event-lane)*1.5rem)] h-5 w-[calc(var(--event-span)*100%)] data-highlighted:bg-blue-200"
                    >
                        {{ event.source.title }}
                    </EventBar>
                </MonthDay>
            </MonthWeek>
        </MonthGrid>
    </CalendarRoot>
</template>

Bars sit inside their start day's gridcell (so the ARIA grid stays intact) and span across with --event-span. Every segment of a multi-week event gets data-highlighted together on hover or focus.

Inside the views, events are typed as plain CalendarEventInput, so read your own fields from an event primitive's slot (event.source), which is typed loosely for that.

Components

| View | Primitives | | ----------- | ----------------------------------------------------------------------------------------------------- | | Shared | CalendarRoot (v-model:date), CalendarNav, CalendarHeading, useCalendar | | Month | MonthGrid, MonthWeekday, MonthWeek, MonthDay, MonthDayMore, EventBar (alias MonthEvent) | | Time grid | TimeGrid, TimeColumn, TimeEvent, TimeSelection, NowIndicator | | Resources | ResourceGrid, ResourceRow, ResourceLabel, ResourceCell, ResourceDayHeader | | Timeline | Timeline, TimelineRow, TimelineTrack, TimelineEvent, TimelineSelection, TimelineNow | | Gantt | Gantt, GanttRow, GanttTrack, GanttBar, GanttToday, GanttLinks | | Interaction | EventResizeHandle, useInteractions, useEventState |

Common data attributes: data-today, data-outside, data-weekend, data-focused, data-selected, data-overflow, data-past, data-highlighted, data-editable, data-dragging, data-all-day, data-continues-before, data-continues-after, data-starts-before, and data-ends-after.

Interactions

Set editable and selectable on CalendarRoot (with snap-minutes and can-edit to tune them). The calendar never changes your events. It emits the intent, and you commit it:

  • event-drop and event-resize carry the event, its new start and end, the previous ones, and a resourceId when it moved rows.
  • range-select carries the selected start, end, allDay, and resourceId.

The keyboard works too: Space picks an event up, arrows move it, Shift with arrows changes its end, Space drops it, and Escape or Tab cancels. Each move is announced in a live region.

Server rendering

By default, the current time comes from the rendering machine's clock and time zone, so a server and a browser can disagree about today, which events are past, and where the now line sits. Pass time-zone and a now the server and the client share to CalendarRoot, or render the calendar on the client only. today and the starting date follow now unless you set them. See Server rendering.

License

MIT