Methane@methane-ui/*
CSS LayoutsComponentsSkillsTheme BuilderGitHub
← All Components

<mth-formula-bar>

@methane-ui/spreadsheet~9.0 KB brotli shell + lazy engine~2.6 KB shell · lazy engine chunk

Spreadsheet formula bar satellite with FACE form integration, live Formula AST dependency inspection, and IME-safe InputController editing.

When NOT to use: Use a lightweight @methane-ui/css layout class instead of a custom element when static CSS suffices.

Live Interactive Preview

Interactive StageLive Custom Element · <mth-formula-bar> (@methane-ui/spreadsheet)
Ready · interact with <mth-formula-bar>, or toggle Theme, Direction (LTR/RTL), or props above.

Multi-Framework Playground & Snippets

<script type="module" src="@methane-ui/spreadsheet/formula-bar"></script>
<mth-formula-bar cell-address="A1"></mth-formula-bar>

Properties & Attributes

PropertyAttributeTypeDefaultDescription
namenamestring""Form field name submitted with parent form.
valuevaluestring""Current cell value or formula string.
cellAddresscell-addressstring"A1"Active cell reference displayed in the address box.
placeholderplaceholderstring""Optional placeholder override.
disableddisabledbooleanfalseDisables editing and excludes control from form submission.
requiredrequiredbooleanfalseRequires non-empty formula or value.
readonlyreadonlybooleanfalsePrevents editing while preserving selection and form value.
labellabelstring""Accessible formula bar label.

Events

EventDetail TypeDescription
mth-formula-input{ cellAddress: string; value: string; dependencies: ReadonlyArray<string> }Fired as the formula text changes.
mth-formula-commit{ cellAddress: string; value: string; valid: boolean }Fired when the user presses Enter or activates Apply.

APG Keyboard Matrix

KeyDirectionWhenExpected Behavior
Enterbothformula input focusedcommits formula and emits mth-formula-commit
Escapebothformula input focusedreverts formula draft to committed value

Accessibility Checklist

CategoryRequirementVerified By
ariaAll aria-* IDREFs resolve within the same DOM root (ADR-003).scanSameRootAria
focusdelegatesFocus: true with zero host internals.role (ADR-014).lint-plugin & spec-compiler
contrastRenders legible borders, focus outlines, and selection indicators under forced-colors: active.Playwright forced-colors matrix
keyboardImplements all 2 APG keyboard transitions across LTR/RTL.mth-formula-bar.spec.test.ts
statesExposes ElementInternals CustomStateSet flags: :state(disabled), :state(readonly), :state(invalid), :state(formula).Conformance suite
i18nRoutes 7 UI/ARIA strings through @methane-ui/core i18n catalog.Locale context test