Grapes homepage1.57.0
  • Guide
  • Tokens
  • Components
    Grapes on GithubGrapes on Figma
    Interaction
    • Button
    • IconButton
    • FloatingActionBar
    • Link
    Icons
    • Icon
    • HighlightIcon
    Form
    • AmountInput
    • Autocomplete
    • AutocompleteMultiple
    • AutocompletePlace
    • CheckboxBox
    • CheckboxField
    • DatePicker
    • FormField
    • Input
    • OptionGroup
    • PasswordInput
    • PhoneInput
    • RadioBox
    • RadioField
    • RadioGroup
    • Select
    • SwitchField
    • TextArea
    • TextInput
    • Upload
    • UploadButton
    Feedback
    • Badge
    • Banner
    • Callout
    • EmptyState
    • Modal
    • ModalSlideshow
    • DeprecatedModalSlideshow
    • PageModal
    • Skeleton
    • Tag
    • Toast
    • Tooltip
    Data display
    • Accordion
    • Avatar
    • Box
    • Calendar
    • CalendarRange
    • CollapsibleList
    • FileCard
    • InfoTip
    • ListBox
    • ListView
    • Panel
    • SidePanel
    • DeprecatedPreview
    • Table
    • Timeline
    • useDateFormatter
    Navigation
    • DropdownItem
    • DropdownMenu
    • Navigation
    • NavigationItem
    • Popover
    • Tabs

    ListView

    ListView is a collection component that provides users with a list of interactive items. ListView is an ideal component for use cases such as Settings parameters.

    View source code
    • Usage
    • Props
    • Accessibility

    Import

    • ListView: The list component.
    • ListItem: A helper component designed to represent an item inside a list.

    Basic usage

    <ListView aria-label="Payment methods activation">
      <ListItem key="1">
        <SwitchField
          label="Expense claims"
          helpText="Get reimbursed by submitting expense claims"
          isChecked={true}
          fit="parent"
        />
      </ListItem>
      <ListItem key="2">
        <SwitchField
          label="Purchase orders"
          helpText="Validate orders internally before working with a supplier"
          isChecked={false}
          fit="parent"
        />
      </ListItem>
      <ListItem key="3">
        <SwitchField
          label="Mileage allowances"
          helpText="Reimburse mileage allowances"
          isChecked={true}
          fit="parent"
        />
      </ListItem>
    </ListView>