calendarIconfunction
An original calendar-page SVG for a month, day and optional year. The library does not read the clock.
The design comes from options.theme (pins when it is left out). Importing this function brings in all 18 designs; to carry one, import its calendarIcon from themes/<name>.
Import it
import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars";
Definition
function calendarIcon(options: CalendarIconOptions): string
Parameters
| Name | Type | Description |
|---|---|---|
options | CalendarIconOptions | The date ( |
Returns
string
The icon as SVG text, <svg …>…</svg>. It throws a RangeError for a theme, housing, size or turn that is not one of ours.
Examples
import { calendarIcon } from "@johnmorrisdotca/koyomi-calendars";
const svg = calendarIcon({ theme: "squircle", month: 11, day: 3, year: 2026, scheme: "dark" });
console.log(svg.startsWith("<svg"));trueWhat it prints (run when this page was built)