### Multilevel Nav Menu Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/nav-menu/README.md
Demonstrates a nested navigation menu structure. The 'Getting Started' item is initially open, showcasing expandable sub-items.
```html
Getting StartedOverviewInstallationActionsButtonIconIcon Button
```
--------------------------------
### Basic Drawer Layout Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/drawer-container/README.md
Illustrates a standard layout with start and end drawers alongside main content.
```html
```
--------------------------------
### Install Dependencies
Source: https://github.com/matraic/m3e/blob/main/README.md
Run this command after cloning the repository to install all necessary project dependencies.
```bash
npm install
```
--------------------------------
### Basic Split Pane Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/split-pane.html
Demonstrates the basic setup of the m3e-split-pane with 'start' and 'end' slots. The 'value' attribute controls the initial size distribution.
```html
```
--------------------------------
### Install Commit Preview Build
Source: https://github.com/matraic/m3e/blob/main/README.md
Installs a preview build of M3E packages for a specific commit SHA.
```bash
npm install pkg.pr.new/matraic/m3e/commit/
```
--------------------------------
### Basic Dialog Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/dialog/README.md
Illustrates a dialog with a header, content, and actions. Use m3e-dialog-trigger to open the dialog.
```html
Open DialogDialog Title
Dialog content goes here.
Close
```
--------------------------------
### Install Pull Request Preview Build
Source: https://github.com/matraic/m3e/blob/main/README.md
Installs a preview build of M3E packages for a specific pull request number.
```bash
npm install pkg.pr.new/matraic/m3e/pull/
```
--------------------------------
### Install M3E Web Package
Source: https://github.com/matraic/m3e/blob/main/README.md
Installs the core M3E Web Components package using npm.
```bash
npm install @m3e/web
```
--------------------------------
### Native Module Support
Source: https://github.com/matraic/m3e/blob/main/docs/components/slider.html
Example of how to use the @m3e/web package directly in a browser using a module script, without a bundler.
```html
```
--------------------------------
### Install M3E React Package
Source: https://github.com/matraic/m3e/blob/main/README.md
Installs the React bindings for M3E Web Components using npm.
```bash
npm install @m3e/react
```
--------------------------------
### Basic App Bar Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/app-bar.html
A basic example of an app bar with leading, title, subtitle, and trailing slots.
```html
Top 10 hiking trailsDiscover popular trails
```
--------------------------------
### Basic Expansion Panel Accordion Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/expansion-panel/README.md
Demonstrates the basic usage of `m3e-accordion` to group `m3e-expansion-panel` components. Each panel has a header and content.
```html
Panel 1
I am content for the first expansion panel
Panel 2
I am content for the second expansion panel
```
--------------------------------
### Drawer Container with Push Mode
Source: https://github.com/matraic/m3e/blob/main/docs/components/drawer-container.html
Configures the start drawer to use the 'push' mode, where it shifts the main content when opened.
```html
Start drawer
Main content
```
--------------------------------
### Install M3E Web Components via npm
Source: https://github.com/matraic/m3e/blob/main/docs/getting-started/installation.html
Install the M3E Web Component library using npm. This is the primary method for adding M3E components to your project.
```bash
npm i @m3e/web
```
--------------------------------
### Basic Navigation Bar Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/nav-bar/README.md
Demonstrates a basic usage of the m3e-nav-bar with multiple m3e-nav-item elements, each featuring an icon and text.
```html
NewsGlobalFor youTrending
```
--------------------------------
### Basic Actionable Card Example
Source: https://github.com/matraic/m3e/blob/main/docs/components/card.html
An example of a basic actionable M3E card linking to Google. Actionable cards are given ARIA role="button" by default.
```html
Google
```
--------------------------------
### Native Module Import
Source: https://github.com/matraic/m3e/blob/main/docs/components/divider.html
Example of importing the m3e-divider component using a native module script.
```html
```
--------------------------------
### Basic Radio Group Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/radio-group/README.md
Demonstrates the basic usage of m3e-radio-group and m3e-radio to create a selectable list of options.
```html
```
--------------------------------
### Basic M3E Select Example
Source: https://github.com/matraic/m3e/blob/main/docs/components/select.html
A simple M3E select component with a label and options. This is a foundational example for basic usage.
```html
Apples
```
--------------------------------
### Install M3E Icons Package
Source: https://github.com/matraic/m3e/blob/main/README.md
Installs the M3E Icons package using npm.
```bash
npm install @m3e/icons
```
--------------------------------
### FAB Menu Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/fab-menu/README.md
Illustrates triggering a m3e-fab-menu from an m3e-fab using a m3e-fab-menu-trigger. The menu contains several m3e-fab-menu-item elements.
```html
FirstSecondThirdForthFifthSixth
```
--------------------------------
### Simple M3E Tree Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/tree/README.md
Demonstrates a basic tree structure with nested items. Use the 'open' attribute to initially expand an item.
```html
Getting StartedOverviewInstallationComponentsButtonCard
```
--------------------------------
### Nested Split Panes Example
Source: https://github.com/matraic/m3e/blob/main/docs/components/split-pane.html
Demonstrates how to nest M3E split panes to create complex, multi-pane layouts. This example shows a primary split pane with a nested vertical split pane.
```html
```
--------------------------------
### Basic Paginator Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/paginator/README.md
Illustrates the basic usage of the m3e-paginator component with a total length of 300 items and showing first/last buttons.
```html
```
--------------------------------
### Basic Drawer Container Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/drawer-container.html
Demonstrates the basic structure of the m3e-drawer-container with start and end drawers, and main content.
```html
Start drawer
Main content
End drawer
```
--------------------------------
### Drawer Container with Over Mode
Source: https://github.com/matraic/m3e/blob/main/docs/components/drawer-container.html
Configures the start drawer to use the 'over' mode, where it overlays the main content without displacement.
```html
Start drawer
Main content
```
--------------------------------
### Linear Stepper Example
Source: https://github.com/matraic/m3e/blob/main/docs/components/stepper.html
Demonstrates a linear stepper where users must complete previous steps before proceeding. Steps can be marked as editable to allow backward navigation.
```html
Fill out your nameFill out your addressDone
```
--------------------------------
### Drawer Toggle with IconButton
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/drawer-container/README.md
Shows how to use m3e-drawer-toggle within an m3e-icon-button to control the start drawer's visibility.
```html
```
--------------------------------
### Min and Max Pane Sizes
Source: https://github.com/matraic/m3e/blob/main/docs/components/split-pane.html
Sets minimum and maximum percentage constraints for the start pane using the 'min' and 'max' attributes.
```html
```
--------------------------------
### Native Module Support
Source: https://github.com/matraic/m3e/blob/main/docs/components/button-group.html
Example of how to import the Button Group component using a native JavaScript module script in a browser.
```html
```
--------------------------------
### Basic Usage of M3E Tabs
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/tabs/README.md
Demonstrates the basic structure for using m3e-tabs, m3e-tab, and m3e-tab-panel components to create a tabbed interface. This example uses the secondary variant.
```html
VideoPhotosAudioVideosPhotosAudio
```
--------------------------------
### Nav Item with Link Attributes
Source: https://github.com/matraic/m3e/blob/main/docs/components/nav-rail.html
Example of a navigation item configured as a link using href, target, rel, and download attributes.
```html
News Link
```
--------------------------------
### Import Map for Dependencies
Source: https://github.com/matraic/m3e/blob/main/docs/components/fab.html
An example of an import map required when using M3E web components directly in the browser without a bundler.
```html
```
--------------------------------
### Using M3E Card with Native Modules
Source: https://github.com/matraic/m3e/blob/main/docs/components/card.html
Demonstrates how to include the M3E Card component in a browser without a bundler using a module script and an import map.
```html
```
```html
```
--------------------------------
### Build, Analyze, and Lint
Source: https://github.com/matraic/m3e/blob/main/README.md
Combines build, analysis, and linting steps into a single command for comprehensive checks.
```bash
npm run all
```
--------------------------------
### Native Module Support with Import Map
Source: https://github.com/matraic/m3e/blob/main/docs/components/loading-indicator.html
Example of how to use the @m3e/web package directly in a browser without a bundler, utilizing JavaScript Modules and an import map for dependencies.
```html
```
--------------------------------
### Checkbox with Label (for Attribute)
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/checkbox/README.md
Example of using the 'for' attribute on a label to associate it with a m3e-checkbox.
```html
```
--------------------------------
### Checkbox with Label (Wrapping)
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/checkbox/README.md
Example of wrapping a m3e-checkbox within a label element for accessibility and usability.
```html
```
--------------------------------
### Import Expansion Panel Module
Source: https://github.com/matraic/m3e/blob/main/docs/components/expansion-panel.html
Import the expansion panel module to enable its components. This should be done once at the application level.
```html
import "@m3e/web/expansion-panel";
```
--------------------------------
### Basic Usage of M3E Option Components
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/option/README.md
Demonstrates the structure of m3e-option-panel with m3e-option and m3e-optgroup elements. Use this to create a selectable list with grouped options.
```html
AppleBananaCitrusLemonOrange
```
--------------------------------
### Basic Chip Set Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/chips/README.md
Use m3e-chip and m3e-chip-set to display non-interactive chips like tags or filters.
```html
DesignAccessibilityMotionDocumentation
```
--------------------------------
### Nav Rail Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/nav-rail/README.md
Illustrates a nav rail with auto mode for expanded state based on screen size, and a toggle button for manual control. Includes an icon button, a FAB, and several nav items.
```html
ExtendedNewsGlobalFor youTrending
```
--------------------------------
### m3e-app-bar Component Usage
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/app-bar/README.md
This snippet shows a basic example of the m3e-app-bar with leading and trailing icons, title, and subtitle.
```APIDOC
## m3e-app-bar
### Description
A bar, placed at the top of a screen, used to help users navigate through an application.
### Attributes
- `centered` (boolean) - Optional - Whether the title and subtitle are centered.
- `size` ("small" | "medium" | "large") - Optional - The size of the bar. Defaults to "small".
- `for` (string) - Optional - The identifier of the interactive control to which this element is attached.
### Slots
- `leading` - Renders content positioned at the start of the bar.
- `subtitle` - Renders the subtitle of the bar.
- `title` - Renders the title of the bar.
- `trailing` - Renders one or more action buttons aligned to the end of the bar.
### CSS Custom Properties
- `--m3e-app-bar-container-color`: Background color of the app bar container.
- `--m3e-app-bar-container-color-on-scroll`: Background color when scrolled.
- `--m3e-app-bar-container-elevation`: Elevation (shadow) of the app bar container.
- `--m3e-app-bar-container-elevation-on-scroll`: Elevation (shadow) when scrolled.
- `--m3e-app-bar-title-text-color`: Color of the app bar title text.
- `--m3e-app-bar-subtitle-text-color`: Color of the app bar subtitle text.
- `--m3e-app-bar-padding-left`: Left padding for the app bar container.
- `--m3e-app-bar-padding-right`: Right padding for the app bar container.
### Example Usage
```html
Top 10 hiking trailsDiscover popular trails
```
```
--------------------------------
### Chip with Leading Icon
Source: https://github.com/matraic/m3e/blob/main/docs/components/chips.html
Add a leading icon to a `m3e-chip` using the `icon` slot. The example uses `m3e-icon`.
```html
Finance
```
--------------------------------
### Basic m3e-icon-button Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/icon-button/README.md
Demonstrates changing the appearance to 'filled', size to 'large', and enabling toggle behavior with a selected state. Use this to create interactive icon buttons with custom styling.
```html
```
--------------------------------
### Linear Progress Indicator - Query Mode
Source: https://github.com/matraic/m3e/blob/main/docs/components/progress-indicator.html
Employ `mode="query"` on `m3e-linear-progress-indicator` for pre-loading states before actual loading begins. `value` and `max` are not applicable in this mode.
```html
```
```html
```
--------------------------------
### Basic Breadcrumb Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/breadcrumb/README.md
A simple breadcrumb with three navigation items. Use m3e-breadcrumb as a wrapper and m3e-breadcrumb-item for each navigation link.
```html
DashboardReportsAnnual
```
--------------------------------
### Basic FAB Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/fab.html
Demonstrates the basic usage of the m3e-fab component with an icon.
```html
```
--------------------------------
### Basic Textarea Autosize Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/textarea-autosize.html
Use m3e-textarea-autosize with the 'for' attribute to link it to a textarea. This example shows integration with m3e-form-field.
```html
```
--------------------------------
### Basic Menu Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/menu.html
Demonstrates a basic menu with two items, triggered by a button.
```html
MenuItem 1Item 2
```
--------------------------------
### Filter Chip Set Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/chips/README.md
Use m3e-filter-chip and m3e-filter-chip-set for single or multi-select filtering options. The 'multi' attribute enables multiselect.
```html
DesignAccessibilityMotionDocumentation
```
--------------------------------
### Basic Split Button Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/split-button/README.md
Illustrates the basic usage of the m3e-split-button by combining m3e-button, m3e-icon-button, and m3e-menu components. The leading button triggers the primary action, and the trailing icon button reveals additional options.
```html
Edit
```
--------------------------------
### Breadcrumb with Custom Separator
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/breadcrumb/README.md
Customize the separator between breadcrumb items by using the 'separator' slot. This example uses a forward slash character.
```html
/DashboardReportsAnnual
```
--------------------------------
### Build All Packages
Source: https://github.com/matraic/m3e/blob/main/README.md
Executes the build process for all packages within the monorepo.
```bash
npm run build
```
--------------------------------
### Import All Icons
Source: https://github.com/matraic/m3e/blob/main/packages/icons/README.md
Import all available icon modules from the package to make them accessible.
```javascript
import "@m3e/icons";
```
--------------------------------
### Using Paginator with Module Script
Source: https://github.com/matraic/m3e/blob/main/docs/components/paginator.html
Demonstrates how to use the M3E paginator component directly in a browser without a bundler, using a module script.
```html
```
--------------------------------
### Assist Chip Set Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/chips/README.md
Use m3e-assist-chip within a m3e-chip-set for actions. The container has ARIA role="group" for accessibility.
```html
EditDeleteCopyShare
```
--------------------------------
### Native Module Support with Import Map
Source: https://github.com/matraic/m3e/blob/main/docs/components/heading.html
To use the `@m3e/web` package directly in a browser without a bundler, use a module script and an import map to manage dependencies.
```html
```
```json
{
"imports": {
"tslib": "https://cdn.jsdelivr.net/npm/tslib@2.8.1/+esm",
"lit": "https://cdn.jsdelivr.net/npm/lit@3.3.0/+esm",
"lit/ப்புகளை": "https://cdn.jsdelivr.net/npm/lit@3.3.0/",
"lit-html": "https://cdn.jsdelivr.net/npm/lit-html@3.3.0/+esm",
"lit-html/directive.js": "https://cdn.jsdelivr.net/npm/lit-html@3.3.0/directive.js",
"lit-html/directives/if-defined.js": "https://cdn.jsdelivr.net/npm/lit-html@3.3.0/directives/if-defined.js",
"lit-html/directives/class-map.js": "https://cdn.jsdelivr.net/npm/lit-html@3.3.0/directives/class-map.js",
"@lit/reactive-element": "https://cdn.jsdelivr.net/npm/@lit/reactive-element@2.0.4/+esm",
"@lit/reactive-element/ப்புகளை": "https://cdn.jsdelivr.net/npm/@lit/reactive-element@2.0.4/",
"@m3e/web/core": "/node_modules/@m3e/web/dist/core.js"
}
}
```
--------------------------------
### Native Module Support with Import Map
Source: https://github.com/matraic/m3e/blob/main/docs/components/expansion-panel.html
Use expansion panels directly in the browser without a bundler by including the module script and an import map for dependencies.
```html
```
--------------------------------
### Basic FAB Menu Usage
Source: https://github.com/matraic/m3e/blob/main/docs/components/fab-menu.html
Demonstrates the basic structure of a FAB menu with a trigger and menu items. The 'for' attribute on the trigger links it to the menu's ID.
```html
Email
Message
Folder
```
--------------------------------
### Range Slider
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/slider/README.md
Example of a labeled range slider with two thumbs for selecting a minimum and maximum value. The thumbs are initialized at 25 and 75.
```html
```
--------------------------------
### Single Value Slider
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/slider/README.md
Example of a labeled slider for selecting a single numeric value. The thumb's initial value is set to 50.
```html
```
--------------------------------
### Vibrant Rounded Toolbar Example
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/toolbar/README.md
Illustrates a vibrant, rounded toolbar with icon buttons. Customize appearance using 'variant' and 'shape' attributes.
```html
```
--------------------------------
### Run Custom Elements Manifest Analysis
Source: https://github.com/matraic/m3e/blob/main/README.md
Initiates the analysis of custom elements manifests for the project.
```bash
npm run cem
```
--------------------------------
### Sticky App Bar with Elevation on Scroll
Source: https://github.com/matraic/m3e/blob/main/packages/web/src/app-bar/README.md
This example demonstrates how to make the app bar sticky and elevate on scroll by attaching it to a scrollable container.
```APIDOC
## Sticky m3e-app-bar with Elevation
### Description
Attaches an app bar to a parent scroll container to produce elevation on scroll. The `for` attribute is used to attach a sticky-positioned `m3e-app-bar` to a parenting container styled to overflow vertically. When scrolled, the app bar will automatically transition to an elevated state.
### Example Usage
```html
Title
I am scrolling content
```
```
--------------------------------
### Import Snackbar Module
Source: https://github.com/matraic/m3e/blob/main/docs/components/snackbar.html
Import the snackbar module to make the M3eSnackbar service available globally.
```html
```
--------------------------------
### Disable Specific Dates with blackoutDates Function
Source: https://github.com/matraic/m3e/blob/main/docs/components/datepicker.html
The `blackoutDates` property accepts a function that determines if a date should be disabled. This example disables weekend dates.
```javascript
document.querySelector("#blackout-dates").blackoutDates = (date) => isWeekend(date);
```