Material Bread
v0.2.10
Home
Getting Started
React Native
Web
Electron
MacOS
Windows
NextJs
Expo
Vue Native
Style
Font
Icons
Theme
Components
Appbar
Searchbar
Appbar Bottom
Avatar
Backdrop
Badge
Banner
Bottom Navigation
Bottom Navigation Item
Button
Card
CardActions
CardContent
CardHeader
CardMedia
Checkbox
Chip
DataTable
DataTableCell
DataTableHeader
DataTablePagination
DataTableRow
Dialog
Divider
Drawer
DrawerHeader
DrawerItem
DrawerSection
DrawerBottom
Fab
Speed dial
Icon
IconButton
List
ListExpand
ListItem
ListSection
Menu
MenuItem
Paper
Progress Bar
Progress Circle
Radio Button
Ripple
Select
SheetBottom
SheetSide
Slider
Snackbar
SwipeNav
Switch
Tabs
Tab
Textfield
Searchfield
ToggleButton
ToggleButtonGroup
Tooltip
Typography
Utils
Anchor
Color
Hoverable
Shadow
Storybook
Showcase
Contributing
Library
Docs
About

List

Lists are continuous, vertical indexes of text or images. - Material Docs

import { List } from 'material-bread';

Component #

List components are built using ListItem s, and ListSection s, and ListExpand . There are many combinations of these components, please see each components page or storybook for more demos.
Attractions
Dining
Education
Health
Family
Office
Promotions
Live Editing
class ListPage extends React.Component {
  constructor(props) {
    super(props)
  }
  render() {
    return (
      <List style={{ maxWidth: 300 }}>
        <ListItem
          text={'Attractions'}
          icon={<Icon name={'local-movies'} size={24} />}
        />
        <ListItem
          text={'Dining'}
          icon={<Icon name={'local-dining'} size={24} />}
        />
        <ListItem text={'Education'} icon={<Icon name={'edit'} size={24} />} />
        <ListItem text={'Health'} icon={<Icon name={'favorite'} size={24} />} />
        <ListItem text={'Family'} icon={<Icon name={'group'} size={24} />} />
        <ListItem
          text={'Office'}
          icon={<Icon name={'content-cut'} size={24} />}
        />
        <ListItem
          text={'Promotions'}
          icon={<Icon name={'loyalty'} size={24} />}
        />
      </List>
    );
  }
}

Usage #

import React, { Component } from 'react';
import { View } from 'react-native';
import { List, ListItem } from 'material-bread';

class ListPage extends React.Component {
  constructor(props) {
    super(props)
  }
  render() {
    return (
      <List style={{ width: 300 }}>
        <ListItem text={'Attractions'} />
        <ListItem text={'Dining'} />
        <ListItem text={'Education'} />
        <ListItem text={'Health'} />
        <ListItem text={'Family'} />
        <ListItem text={'Office'} />
        <ListItem text={'Promotions'} />
      </List>
    );
  }
}

Props #

Name
Description
Type
Default
shadow
Shadow using the Shadow util
number
style
Styles root element
object
subheader
Adds a subheader for the whole list
string

Demos #

You can see even more examples in the Storybook environment.

Subheader #

Favorites
Janet Perkins
Mary Perkins
Peter Carlsson
Trevor Hansen
Live Editing
class DialogPage extends React.Component {
  constructor(props) {
    super(props)
  }
  render() {
    return (
        <List subheader={'Favorites'} style={{ maxWidth: 300 }}>
            <ListItem
                text={'Janet Perkins'}
                media={
                    <Avatar
                        type="icon"
                        content="person"
                        contentColor={'#ececec'}
                        color={'#a3a3a3'}
                        size={40}
                    />
                }
            />
            <ListItem
                text={'Mary Perkins'}
                media={
                    <Avatar
                        type="icon"
                        content="person"
                        contentColor={'#ececec'}
                        color={'#a3a3a3'}
                        size={40}
                    />
                }
            />
            <ListItem
                text={'Peter Carlsson'}
                media={
                    <Avatar
                        type="icon"
                        content="person"
                        contentColor={'#ececec'}
                        color={'#a3a3a3'}
                        size={40}
                    />
                }
            />
            <ListItem
                text={'Trevor Hansen'}
                media={
                    <Avatar
                        type="icon"
                        content="person"
                        contentColor={'#ececec'}
                        color={'#a3a3a3'}
                        size={40}
                    />
                }
            />
        </List>
    );
  }
}