← All Components
<mth-timezone-picker>
Form-associated IANA timezone selector powered by Intl.supportedValuesOf("timeZone"), UTC offset formatting, and ListboxController.
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-timezone-picker>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/timezone-picker"></script>
<mth-timezone-picker></mth-timezone-picker>import '@methane-ui/ui/timezone-picker';
import '@methane-ui/react';
export function Example() {
return <mth-timezone-picker></mth-timezone-picker>;
}<script setup lang="ts">
import '@methane-ui/ui/timezone-picker';
</script>
<template>
<mth-timezone-picker></mth-timezone-picker>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/timezone-picker';
import { MthTimezonePickerDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthTimezonePickerDirective],
template: `<mth-timezone-picker></mth-timezone-picker>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/timezone-picker';
import MthTimezonePicker from '@methane-ui/svelte/MthTimezonePicker.svelte';
</script>
<MthTimezonePicker></MthTimezonePicker>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Selected IANA timezone identifier (e.g. America/New_York or UTC). |
name | name | string | "" | Form field name. |
label | label | string | "" | Accessible field label. |
placeholder | placeholder | string | "" | Placeholder shown when no timezone is selected. |
open | open | boolean | false | Whether the timezone listbox popover is open. |
disabled | disabled | boolean | false | Disables interaction. |
readonly | readonly | boolean | false | Prevents changing the selected timezone. |
required | required | boolean | false | Marks a timezone selection as required. |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-change | { value: string } | Fired when the selected timezone changes. |
mth-open | { open: true } | Cancelable event fired before opening. |
mth-after-open | { open: true } | Fired after opening completes. |
mth-close | { reason: string } | Fired on close. |
mth-after-close | { reason: string } | Fired after close completes. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowDown | both | Trigger or listbox is focused | Opens timezone popover and navigates options |
| Enter | both | Timezone option is active | Selects active IANA timezone and closes popover |
| Escape | both | Timezone popover is open | Closes popover and restores focus |
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 3 APG keyboard transitions across LTR/RTL. | mth-timezone-picker.spec.test.ts |
| states | Exposes ElementInternals CustomStateSet flags: :state(open), :state(disabled), :state(readonly), :state(dirty), :state(touched), :state(invalid). | Conformance suite |
| i18n | Routes 2 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |