menu
Dark Mode
backgroundLayer 1
preact-material-components
Components and their props
  • List
    • dense true/false
      Makes the list with lesser padding.
    • two-line true/false
      Makes container for two line list item.
  • List.Item
    • no specific props
  • List.LinkItem
    • no specific props
  • List.ItemGraphic
    • no specific props
  • List.ItemMeta
    • no specific props
  • List.TextContainer
    • no specific props
  • List.PrimaryText
    • no specific props
  • List.SecondaryText
    • no specific props
Sample code
import {h, Component} from 'preact';
import List from 'preact-material-components/List';
import 'preact-material-components/List/style.css';

export default class ListPage extends Component {
  render(){
    return (
      <div>
        <List>
          <List.Item>Item1</List.Item>
          <List.Item>Item2</List.Item>
          <List.Item>Item3</List.Item>
          <List.Item>Item4</List.Item>
          <List.Item>Item5</List.Item>
        </List>
      </div>
    );
  }
}
Original documentation
This component encapsulates mdc-list, you can refer to its documentation here.
Demo
Normal
  • Item1
  • Item2
  • Item3
  • Item4
  • Item5
Action items
Two line
  • Heading 1Lorem ipsum dolor sit amet.
  • Heading 2Lorem ipsum dolor sit amet.
  • Heading 3Lorem ipsum dolor sit amet.
Avatar

    Work

  • PhotosJan 9, 2014
  • WorkJan 28, 2014
  • Vacation

  • HawaiFeb 9, 2014
  • IndiaMar 28, 2014