← All Components
<mth-list-item>
Semantic list row (role="listitem") for <mth-list> with prefix/suffix slots, secondary description, selection state, and safe link support.
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-list-item>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/ui/list-item"></script>
<mth-list-item>Example</mth-list-item>import '@methane-ui/ui/list-item';
import '@methane-ui/react';
export function Example() {
return <mth-list-item>Example</mth-list-item>;
}<script setup lang="ts">
import '@methane-ui/ui/list-item';
</script>
<template>
<mth-list-item>Example</mth-list-item>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/ui/list-item';
import { MthListItemDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthListItemDirective],
template: `<mth-list-item>Example</mth-list-item>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/ui/list-item';
import MthListItem from '@methane-ui/svelte/MthListItem.svelte';
</script>
<MthListItem>Example</MthListItem>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | "" | Unique item value identifier used by parent <mth-list> selection. |
description | description | string | "" | Optional secondary text rendered below the primary content. |
selected | selected | boolean | false | Marks the item as selected. |
disabled | disabled | boolean | false | Disables interaction and excludes item from roving keyboard focus. |
interactive | interactive | boolean | false | Enables pointer hover/focus affordances. |
href | href | string | "" | Optional validated destination URL (https:, http:, mailto:, tel:, or relative path). |
Accessibility Checklist
| Category | Requirement | Verified By |
|---|---|---|
| aria | All aria-* IDREFs resolve within the same DOM root (ADR-003). | scanSameRootAria |
| focus | Focus ownership matches focusModel="host" with host role="listitem". | 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(selected), :state(disabled), :state(interactive). | Conformance suite |
| i18n | Routes 1 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |