List

List items best used in mobile applications.

Examples

Basic usage

  • Label One
  • Label Two
  • Label Three

    description

  • Label Four

    description

Artwork sizes

  • Search
    Label One
  • Search
    Label Two
  • Search
    Label Three
  • Search
    Label Four
  • Search
    Label Five
  • Search
    Label Six

End enhancers

  • Label
  • Label
  • Label
    Chevron Right
  • Label
    Label

Sublist

  • Label One

  • Label Two

  • Search

    Label Three

    Chevron Right
  • Search

    Label Four

    Chevron Right
  • Search

    Label Five

    Chevron Right
  • Search

    Label Six

    Label Six

  • Search

    Label Seven

    Label Seven

  • Search

    Label Eight

    Label Eight

Usage with Menu

  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right
  • Search
    Jane Smith

    Senior Engineering Manager

    Chevron Right

Overrides

Additionally, you can fully customize any part of the ListItem through the overrides prop. The ListItem consists of multiple subcomponents that are listed bellow and you can override each one of them. To help you identify the names of these subcomponents, you can highlight them through this selector:

  • Search
    Label
  • Note: You should always use longhand CSS properties. Mixing shorthands and longhands will lead into strange behaviors!

    API

    ListItem API

    Warning any = "Prop types are not shown in dev mode"

    extract-react-types is not being run in dev mode for speed reasons. If you need to see prop types add the environment variable FORCE_EXTRACT_REACT_TYPES eg:

    • FORCE_EXTRACT_REACT_TYPES=true yarn start <packageName>
    • FORCE_EXTRACT_REACT_TYPES=true yarn start:<team>

    ListItemLabel API

    Warning any = "Prop types are not shown in dev mode"

    extract-react-types is not being run in dev mode for speed reasons. If you need to see prop types add the environment variable FORCE_EXTRACT_REACT_TYPES eg:

    • FORCE_EXTRACT_REACT_TYPES=true yarn start <packageName>
    • FORCE_EXTRACT_REACT_TYPES=true yarn start:<team>

    List exports

    You can import this module like so:

    import {ListItem} from 'baseui/list'

    It exports the following components or utility functions:

    • ListItem
    • ListItemLabel
    • MenuAdapter
    • ARTWORK_SIZES
    • StyledRoot
    • StyledContent
    • StyledEndEnhancerContainer
    • StyledArtworkContainer