Calendar
Range Presets
A reporting period chosen by preset — “last 7 days”, “previous month” and four more — with two date fields below showing what the preset expanded into.
React + Tailwind, shadcn-compatible: press “Copy for AI” and your Cursor or Claude Code agent installs it with the shadcn CLI.
What you can change
- label — the heading above the presets
- today — the reference date every preset is measured from
- defaultPreset — the preset selected at first render
A link for your AI agent: preview, code and instructions.
Preview

Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this on the home page as the hero:
https://vibeui.club/c/calendar-027?lang=en&theme=dark
Not sure where to paste it? Step-by-step guide
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
Loading…
How to use
<Calendar027 defaultPreset="7d" today="2026-04-15" />A sample call. The agent installs the component itself from the registry via the “Copy for AI” link.
Settings
- Preset
defaultPreset· default: 7d- Accent
accent· default: theme colour- Surface
background· default: theme colour- Reference date
today· default: 2026-04-15
More in Calendar
FAQ
- How do I add Range Presets with Cursor or Claude Code?
- Press “Copy for AI” on this page and paste it into your agent's chat. The instruction contains the shadcn CLI install command, the dependencies and what to keep, so the agent installs this exact component instead of recreating a lookalike.
- What does Range Presets depend on?
- No npm packages beyond React and Tailwind CSS.
- What can I change in Range Presets?
- Adapt: label — the heading above the presets; today — the reference date every preset is measured from; defaultPreset — the preset selected at first render. Keep as installed: the local --vibeui-calendar-027-* palette — do not swap it for your theme tokens (bg-secondary, border-input and the like); the reference date arriving as the today prop: Date.now() inside render breaks hydration and makes the result irreproducible; the pure resolve function: a single place where each preset's meaning lives, easy to cover with a test.
- Is Range Presets free?
- The preview is open to everyone; the source is available with a PRO subscription.
For developers
npx shadcn@latest add https://vibeui.club/r/pro/calendar-027.jsonThis command needs a signed link: sign in and open “Component source” below — it issues a working link valid for 30 minutes. All install options
Technical notes
The component is self-contained: one file, zero dependencies, its own palette in local variables --vibeui-calendar-027-*. Client-side: the selected preset and both bounds live in useState. The presets are expanded by the pure function resolve from the today reference date, which arrives as a prop — Date.now() inside the component would split the server and the client render. The date fields are native input type="date" with mutual min and max, so the browser itself does not let the period be reversed; editing by hand moves the choice into the custom state. The total counts the number of days inclusive and declines it through pluralize, while an invalid period (the end earlier than the start) is shown as separate text on a muted backing. The theme comes from the surrounding color-scheme through light-dark(): the component has no surface of its own by default, it sits directly on the page background and darkens along with it, while the background prop brings the panel back. The preset, field and total captions arrive in props, the Russian values sit in the defaults.
Tags
- calendar
- range
- presets
- reports
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
Loading…