npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@arterial/list

v3.0.0

Published

Another React Material List

Downloads

39

Readme

Arterial List

Another React Material List

Installation

npm install @arterial/list

Usage

Styles

Sass

@use "@material/list/index.scss" as list;
@include list.core-styles;

CSS

import '@material/list/dist/mdc.list.css';

JSX

import { List, ListItem, ListItemText, ... } from '@arterial/list';

Single-line List

Single-line list items contain a maximum of one line of text.

<List>
  <ListItem>
    <ListItemText>Single-line item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Single-line item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Single-line item</ListItemText>
  </ListItem>
</List>

Two-line List

Two-line list items contain a maximum of two lines of text.

<List twoLine>
  <ListItem>
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText>
    </ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText>
    </ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText
    </ListItemText>
  </ListItem>
</List>

Other Variants

Dense

<List dense>
  <ListItem>
    <ListItemText>Dense item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Dense item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Dense item</ListItemText>
  </ListItem>
</List>

Non-interactive

<List nonInteractive>
  <ListItem>
    <ListItemText>Non-interactive item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Non-interactive item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemText>Non-interactive item</ListItemText>
  </ListItem>
</List>

Icon

<List iconList>
  <ListItem>
    <ListItemGraphic graphic="wifi" />
    <ListItemText>Icon item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic="wifi" />
    <ListItemText>Icon item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic="wifi" />
    <ListItemText>Avatar item</ListItemText>
  </ListItem>
</List>

Avatar

import Avatar from 'avatar.png';

<List avatarList>
  <ListItem>
    <ListItemGraphic graphic={<img src={Avatar} alt="avatar" />} />
    <ListItemText>Avatar item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Avatar} alt="avatar" />} />
    <ListItemText>Avatar item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Avatar} alt="avatar" />} />
    <ListItemText>Avatar item</ListItemText>
  </ListItem>
</List>;

Thumbnail

import Thumb from 'thumb.png';

<List thumbnailList>
  <ListItem>
    <ListItemGraphic graphic={<img src={Thumb} alt="thumb" />} />
    <ListItemText>Thumbnail item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Thumb} alt="thumb" />} />
    <ListItemText>Thumbnail item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Thumb} alt="thumb" />} />
    <ListItemText>Thumbnail item</ListItemText>
  </ListItem>
</List>;

Image

import Image from 'image.png';

<List imageList>
  <ListItem>
    <ListItemGraphic graphic={<img src={Image} alt="image" />} />
    <ListItemText>Image item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Image} alt="image" />} />
    <ListItemText>Image item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Image} alt="image" />} />
    <ListItemText>Image item</ListItemText>
  </ListItem>
</List>;

Video

import Video from 'video.png';

<List videoList>
  <ListItem>
    <ListItemGraphic graphic={<img src={Video} alt="video" />} />
    <ListItemText>Video item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Thumb} alt="video" />} />
    <ListItemText>Video item</ListItemText>
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic={<img src={Thumb} alt="video" />} />
    <ListItemText>Video item</ListItemText>
  </ListItem>
</List>;

Activated

const ITEMS = ['inbox', 'star', 'send', 'drafts'];
function capitalize(value) {
  return value.charAt(0).toUpperCase() + value.substring(1);
}
function Activated() {
  const [activated, setActivated] = useState('star');
  return (
    <List>
      {ITEMS.map(item => (
        <ListItem
          activated={activated === item}
          id={item}
          key={item}
          onClick={() => setActivated(item)}
        >
          {capitalize(item)}
        </ListItem>
      ))}
    </List>
  );
}

Selected

const ITEMS = ['inbox', 'star', 'send', 'drafts'];
function capitalize(value) {
  return value.charAt(0).toUpperCase() + value.substring(1);
}
function Selected() {
  const [selected, setSelected] = useState('star');
  return (
    <List>
      {ITEMS.map(item => (
        <ListItem
          id={item}
          key={item}
          onClick={() => setSelected(item)}
          selected={selected === item}
        >
          {capitalize(item)}
        </ListItem>
      ))}
    </List>
  );
}

Graphic

import {Checkbox} from '@arterial/checkbox';
import {Radio} from '@arterial/radio';

<List tag="div">
  <ListItem tag="div">
    <ListItemGraphic graphic="wifi" />
    <ListItemText>Graphic as icon</ListItemText>
  </ListItem>
  <ListItem tag="label">
    <ListItemGraphic
      graphic={<Checkbox id="graphic-check" onChange={() => {}} />}
    />
    <ListItemText>Graphic with checkbox</ListItemText>
  </ListItem>
  <ListItem tag="label">
    <ListItemGraphic
      graphic={<Radio id="graphic-radio" onChange={() => {}} />}
    />
    <ListItemText>Graphic with radio</ListItemText>
  </ListItem>
</List>;

Metadata

import {Checkbox} from '@arterial/checkbox';
import {Radio} from '@arterial/radio';

<List tag="div">
  <ListItem tag="div">
    <ListItemText>Meta as text</ListItemText>
    <ListItemMeta meta="info" />
  </ListItem>
  <ListItem tag="div">
    <ListItemText>Meta with icon component</ListItemText>
    <ListItemMeta meta={<Icon icon="info" />} />
  </ListItem>
  <ListItem tag="div">
    <ListItemText>Meta with two icon components</ListItemText>
    <ListItemMeta
      meta={
        <>
          <Icon icon="info" />
          <Icon icon="info" />
        </>
      }
    />
  </ListItem>
  <ListItem tag="div">
    <ListItemText>Meta with icon button</ListItemText>
    <ListItemMeta
      meta={<IconButton icon="more_vert" style={{marginRight: '-12px'}} />}
    />
  </ListItem>
  <ListItem tag="label">
    <ListItemText>Meta with checkbox</ListItemText>
    <ListItemMeta
      meta={
        <Checkbox
          id="meta-checkbox"
          onChange={() => {}}
          style={{marginRight: '-8px'}}
        />
      }
    />
  </ListItem>
  <ListItem tag="label">
    <ListItemText>Meta with radio</ListItemText>
    <ListItemMeta
      meta={<Radio id="meta-radio" onChange={() => {}} />}
      style={{marginRight: '-8px'}}
    />
  </ListItem>
</List>;

Graphic and Metadata

<List twoLine>
  <ListItem>
    <ListItemGraphic graphic="folder" />
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText>
    </ListItemText>
    <ListItemMeta meta="info" />
  </ListItem>
  <ListItem>
    <ListItemGraphic graphic="folder" />
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText>
    </ListItemText>
    <ListItemMeta meta="info" />
  </ListItem>
  <ListDivider />
  <ListItem>
    <ListItemGraphic graphic="folder" />
    <ListItemText>
      <ListItemPrimaryText>Two-line item</ListItemPrimaryText>
      <ListItemSecondaryText>Secondary text</ListItemSecondaryText>
    </ListItemText>
    <ListItemMeta meta="info" />
  </ListItem>
</List>

Grouped

<ListGroup>
  <ListGroupSubheader>List 1</ListGroupSubheader>
  <List>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
  </List>
  <ListGroupSubheader>List 2</ListGroupSubheader>
  <List>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
    <ListItem>
      <ListItemText>Line item</ListItemText>
    </ListItem>
  </List>
</ListGroup>

Props

List

| Name | Type | Description | | -------------- | ---------------- | ----------------------------------------------------------- | | avatarList | boolean | Enables an avatar list variant. | | children | node | Elements to be displayed within root element. | | className | string | Classes to be applied to the root element. | | dense | boolean | Enables a dense variant. | | iconList | boolean | Enables an icon list variant. | | imageList | boolean | Enables an image list variant. | | nonInteractive | boolean | Enables a non-interactive variant. | | textualList | boolean | Enables an textual list variant. | | thumbnailList | boolean | Enables an thumbnail list variant. | | twoLine | boolean | Enables a two-line variant. | | videoList | boolean | Enables an video list variant. | | tag | string | object | HTML tag to be applied to the root element. Defaults to ul. |

ListItem

| Name | Type | Description | | --------- | ---------------- | ----------------------------------------------------------- | | activated | boolean | Indicates whether the element is activated. | | children | node | Elements to be displayed within root element. | | className | string | Classes to be applied to the root element. | | disabled | boolean | Indicates whether the element is disabled. | | selected | boolean | Indicates whether the element is selected. | | tag | string | object | HTML tag to be applied to the root element. Defaults to li. |

ListItemText

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------- | | children | node | Elements to be displayed within root element. | | className | string | Classes to be applied to the root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to span. |

ListItemPrimaryText

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------- | | children | node | Elements to be displayed within root element. | | className | string | Classes to be applied to the root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to span. |

ListItemSecondaryText

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------- | | children | node | Elements to be displayed within root element. | | className | string | Classes to be applied to the root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to span. |

ListItemGraphic

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------- | | className | string | Classes to be applied to the root element. | | graphic | node | Elements to be displayed within root element. | | style | object | Styles to be applied to the root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to span. |

ListItemMeta

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------- | | className | string | Classes to be applied to the root element. | | meta | node | Elements to be displayed within root element. | | style | object | Styles to be applied to the root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to span. |

ListGroup

| Name | Type | Description | | --------- | ---------------- | ------------------------------------------------------------ | | className | string | Classes to be applied to the root element. | | children | node | Elements to be displayed within root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to div. |

ListGroupSubheader

| Name | Type | Description | | --------- | ---------------- | ----------------------------------------------------------- | | className | string | Classes to be applied to the root element. | | children | node | Elements to be displayed within root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to h3. |

ListDivider

| Name | Type | Description | | --------- | ---------------- | ----------------------------------------------------------- | | className | string | Classes to be applied to the root element. | | children | node | Elements to be displayed within root element. | | tag | string | object | HTML tag to be applied to the root element. Defaults to li. |