Socket
Socket
Sign inDemoInstall

@material/list

Package Overview
Dependencies
Maintainers
14
Versions
1698
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@material/list

The Material Components for the web list component


Version published
Weekly downloads
723K
decreased by-18.6%
Maintainers
14
Weekly downloads
 
Created

What is @material/list?

@material/list is a package from the Material Design Components (MDC) library that provides a set of components and utilities for creating lists with Material Design styling. It allows developers to create various types of lists, such as single-line, two-line, and three-line lists, with support for interactive elements like checkboxes, radio buttons, and icons.

What are @material/list's main functionalities?

Single-line List

This feature allows you to create a single-line list with Material Design styling. The `singleSelection` property enables single item selection within the list.


import { MDCList } from '@material/list';

const list = new MDCList(document.querySelector('.mdc-list'));
list.singleSelection = true;

Two-line List

This feature allows you to create a two-line list where each list item can have a primary and secondary text. The `wrapFocus` property ensures that focus wraps from the last item back to the first item when navigating with the keyboard.


import { MDCList } from '@material/list';

const list = new MDCList(document.querySelector('.mdc-list'));
list.wrapFocus = true;

List with Checkboxes

This feature allows you to create a list where each item includes a checkbox. The code initializes the list and maps over each list item to initialize the checkboxes.


import { MDCList } from '@material/list';

const list = new MDCList(document.querySelector('.mdc-list'));
list.listElements.map((listItemEl) => new MDCCheckbox(listItemEl.querySelector('.mdc-checkbox')));

List with Icons

This feature allows you to create a list where each item includes an icon button. The code initializes the list and maps over each list item to initialize the icon buttons.


import { MDCList } from '@material/list';

const list = new MDCList(document.querySelector('.mdc-list'));
list.listElements.map((listItemEl) => new MDCIconButtonToggle(listItemEl.querySelector('.mdc-icon-button')));

Other packages similar to @material/list

Keywords

FAQs

Package last updated on 26 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc