← All Components
<mth-cron-builder>
Form-associated 5-field cron expression builder with quick presets and human-readable schedule summary.
When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.
Live Interactive Preview
Ready · interact with <mth-cron-builder>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/cron-builder"></script>
<mth-cron-builder value="0 * * * *"></mth-cron-builder>import '@methane-ui/ui/cron-builder';
import '@methane-ui/react';
export function Example() {
return <mth-cron-builder value="0 * * * *"></mth-cron-builder>;
}<script setup lang="ts">
import '@methane-ui/ui/cron-builder';
</script>
<template>
<mth-cron-builder value="0 * * * *"></mth-cron-builder>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/cron-builder';
import { MthCronBuilderDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthCronBuilderDirective],
template: `<mth-cron-builder value="0 * * * *"></mth-cron-builder>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/cron-builder';
import MthCronBuilder from '@methane-ui/svelte/MthCronBuilder.svelte';
</script>
<MthCronBuilder value="0 * * * *"></MthCronBuilder>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "0 * * * *" | Five-field cron expression string (minute hour day-of-month month day-of-week). |
name | name | string | "" | Form field name. |
label | label | string | "" | Accessible field label. |
disabled | disabled | boolean | false | Disables interaction. |
readonly | readonly | boolean | false | Prevents editing cron fields or applying presets. |
required | required | boolean | false | Marks a cron expression as required. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { value: string } | Fired when the cron expression changes. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| Enter | both | Preset button is focused | Applies preset 5-field cron expression |
| Tab | both | Moving across cron fields | Moves focus sequentially across minute, hour, day, month, and weekday inputs |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | delegatesFocus: true with zero host internals.role (ADR-014). | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| keyboard | Implements all 2 APG keyboard transitions across LTR/RTL. | mth-cron-builder.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly), :state(dirty), :state(touched), :state(invalid). | Conformance suite |
| i18n | Routes 8 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |