← All Components
<mth-file-explorer>
File and folder explorer (<mth-file-explorer>) with hierarchical folder tree, clickable path breadcrumbs, list/grid views, multi-select, and 2D RTL-aware keyboard navigation.
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-file-explorer>, or toggle Theme, Direction (LTR/RTL), or props above.
Multi-Framework Playground & Snippets
<script type="module" src="@methane-ui/admin/file-explorer"></script>
<mth-file-explorer view-mode="list" columns="3">Example</mth-file-explorer>import '@methane-ui/admin/file-explorer';
import '@methane-ui/react';
export function Example() {
return <mth-file-explorer view-mode="list" columns="3">Example</mth-file-explorer>;
}<script setup lang="ts">
import '@methane-ui/admin/file-explorer';
</script>
<template>
<mth-file-explorer view-mode="list" columns="3">Example</mth-file-explorer>
</template>import { Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import '@methane-ui/admin/file-explorer';
import { MthFileExplorerDirective } from '@methane-ui/angular';
@Component({
standalone: true,
schemas: [CUSTOM_ELEMENTS_SCHEMA],
imports: [MthFileExplorerDirective],
template: `<mth-file-explorer view-mode="list" columns="3">Example</mth-file-explorer>`,
})
export class ExampleComponent {}<script lang="ts">
import '@methane-ui/admin/file-explorer';
import MthFileExplorer from '@methane-ui/svelte/MthFileExplorer.svelte';
</script>
<MthFileExplorer view-mode="list" columns="3">Example</MthFileExplorer>Properties & Attributes
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
items | — | ReadonlyArray<unknown> | — | Flat list of files and folders linked via parentId. |
currentFolderId | current-folder-id | string | null | — | Active directory ID (null for root). |
viewMode | view-mode | 'list' | 'grid' | "list" | Layout mode (list or grid). |
columns | columns | number | 3 | Number of grid columns when viewMode="grid". |
Events
| Event | Detail Type | Description |
|---|---|---|
mth-navigate | { folderId: string | null } | Emitted when navigating to another folder. |
mth-file-open | { item: unknown } | Emitted when opening a file. |
mth-selection-change | { selectedIds: ReadonlyArray<string> } | Emitted when the selected item IDs change. |
APG Keyboard Matrix
| Key | Direction | When | Expected Behavior |
|---|---|---|---|
| ArrowRight | both | an entry has focus | moves focus to next entry (or previous in RTL) |
| ArrowLeft | both | an entry has focus | moves focus to previous entry (or next in RTL) |
| ArrowDown | both | an entry has focus | moves focus down in list or grid |
| ArrowUp | both | an entry has focus | moves focus up in list or grid |
| Home | both | an entry has focus | focuses the first entry |
| End | both | an entry has focus | focuses the last entry |
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 6 APG keyboard transitions across LTR/RTL. | mth-file-explorer.spec.test.ts |
| i18n | Routes 11 UI/ARIA strings through @methane-ui/core i18n catalog. | Locale context test |