← All Components
<mth-invoice>
Print-friendly structured invoice view with localized Intl.NumberFormat line totals, sanitized brand logo URL, and status badge.
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-invoice>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/commerce/invoice"></script>
<mth-invoice status="paid" currency="USD"></mth-invoice>import '@methane-ui/commerce/invoice';
import '@methane-ui/react';
export function Example() {
return <mth-invoice status="paid" currency="USD"></mth-invoice>;
}<script setup lang="ts">
import '@methane-ui/commerce/invoice';
</script>
<template>
<mth-invoice status="paid" currency="USD"></mth-invoice>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/commerce/invoice';
import { MthInvoiceDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthInvoiceDirective],
template: `<mth-invoice status="paid" currency="USD"></mth-invoice>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/commerce/invoice';
import MthInvoice from '@methane-ui/svelte/MthInvoice.svelte';
</script>
<MthInvoice status="paid" currency="USD"></MthInvoice>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
invoiceNumber | invoice-number | string | "" | Invoice identifier string. |
issueDate | issue-date | string | "" | Formatted or ISO issue date. |
dueDate | due-date | string | "" | Formatted or ISO payment due date. |
status | status | 'paid' | 'pending' | 'overdue' | 'draft' | "pending" | Payment status: paid, pending, overdue, or draft. |
currency | currency | string | "USD" | ISO 4217 currency code for Intl.NumberFormat. |
locale | locale | string | "" | Optional BCP 47 locale override; defaults to UIElement resolvedLocale. |
seller | — | unknown | null | — | Seller contact and billing address metadata. |
buyer | — | unknown | null | — | Buyer contact and billing address metadata. |
items | — | ReadonlyArray<unknown> | — | Invoice line items with description, quantity, and unitPrice. |
taxRate | tax-rate | number | 0 | Fractional tax rate applied after discount. |
discountAmount | discount-amount | number | 0 | Flat discount subtracted before tax. |
notes | notes | string | "" | Optional memo or payment instructions. |
logoUrl | logo-url | string | "" | Optional brand logo URL validated via @methane-ui/sanitize. |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="none". | lint-plugin & spec-compiler |
| contrast | Renders legible borders, focus outlines, and selection indicators under forced-colors: active. | Playwright forced-colors matrix |
| states | Exposes ElementInternals CustomStateSet flags: :state(paid), :state(overdue). | Conformance suite |
| i18n | Routes 18 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |