List

December 31, 2018 ยท View on GitHub

Displays a list of List Tiles, with an optional header.

Lists are also the base component of Menus.

Main features

  • All List Tile main features
  • Stack lists vertically
  • Set borders
  • Indent borders
  • Optional compact display
  • RTL (right-to-left) support

Usage

Options

List specific options

ParameterRequiredTypeDefaultDescription
tilesuse tiles or contentArray of type String, hyperscript or componentList of List Tile components or List Tile options
alloptionalOptions ObjectList Tile options that will be applied to all tiles; for this, List children need to be passed as options (instead of passing a list of List Tile components)
borderoptionalBooleanfalseSet to true to insert separator borders between List Tiles
compactoptionalBooleanfalseSet to true to reduce vertical padding of list tiles
headeroptionalObjectOptions object for a List Tile; use sticky to pin the header when scrolling - does not work in IE or Edge < 16
indentedBorderoptionalBooleanfalseSet to true to indent the list tile borders; for a proper layout, List Tiles must have option indent as well
paddingoptionalString"both"Vertical padding; possible values: "top", "bottom", "none", "both"

Common component options

ParameterRequiredTypeDefaultDescription
afteroptionalString, hyperscript or componentExtra content after main content; note that this content is placed right of preceding elements with a higher stacking depth
beforeoptionalString, hyperscript or componentExtra content before main content; note that this content is placed left of subsequent elements with a lower stacking depth
classNameoptionalStringExtra CSS class appended to pe-list
contentuse tiles or contentString, hyperscript or componentAlternative content; replaces children and ignores tiles
elementoptionalString"div"HTML element tag
idoptionalStringHTML element id
styleoptionalObjectFor setting simple style attributes
toneoptionalString: "dark" or "light"Renders the component light on dark (sets class pe-dark-tone); use "light" to locally inverse (sets class pe-light-tone)

Composition

List is composed from:

CSS classes