A visual editor for cron expressions. Hourly/daily/weekly/monthly modes, raw expression editing, validation, and a human-readable preview.
bunx --bun shadcn@latest add https://ui.ahmet.studio/r/cron-builder
import { CronBuilder, type CronValue } from "@/components/ui/cron-builder"; export function Demo() { const [value, setValue] = React.useState<CronValue>({ expression: "0 9 * * 1", mode: "weekly", }); return <CronBuilder value={value} onChange={setValue} />; }
There are no shadcn-compatible cron builders out there. This one ships:
humanizeCron(expression) is exported as a utility.daily and weekly).| Prop | Type | Default |
|---|---|---|
value | CronValue | undefined |
defaultValue | CronValue | { expression: "0 * * * *", mode: "hourly" } |
onChange | (value: CronValue) => void | undefined |
modes | CronMode[] | all |
showHumanReadable | boolean | true |
showExpression | boolean | true |
import { humanizeCron } from "@/components/ui/cron-builder"; humanizeCron("0 9 * * 1"); humanizeCron("*/15 * * * *");