List

A flexible component for rendering data as simple or complex list items.

When to Use

  • To display a collection of similar items (articles, contacts, tasks)
  • When items need a consistent layout with avatar, title, and description
  • For paginated data feeds

Import

import { List } from "orizon";

Examples

Basic

Item 1
Item 2
Item 3
Item 4
<List
  bordered
  dataSource={["Item 1", "Item 2", "Item 3"]}
  renderItem={(item) => <List.Item>{item}</List.Item>}
/>

With Meta

J
John Brown
Software Engineer
J
Jane Smith
Product Designer
B
Bob Wilson
Data Scientist
<List
  itemLayout="horizontal"
  dataSource={data}
  renderItem={(item) => (
    <List.Item>
      <List.Item.Meta
        avatar={<Avatar src={item.avatar} />}
        title={item.title}
        description={item.description}
      />
    </List.Item>
  )}
/>

Sizes

Small List
Item A
Item B
Item C
<List size="small" header="Small List" bordered dataSource={data}
  renderItem={(item) => <List.Item>{item}</List.Item>}
/>

API

ListProps

  • dataSourceany[] — Data array
  • renderItem(item, index) => ReactNode — Item render function
  • headerReactNode — List header
  • footerReactNode — List footer
  • borderedboolean — Show border (default: false)
  • loadingboolean — Show loading state
  • paginationfalse | PaginationProps — Pagination config
  • size"default" | "large" | "small" — List size
  • grid{ column, gutter, xs, sm, md, lg, xl, xxl } — Grid layout config
  • itemLayout"horizontal" | "vertical" — Item layout direction (default: "horizontal")
  • splitboolean — Show dividers between items (default: true)
  • rowKeystring | (item) => string — Row key

List.Item Props

  • actionsReactNode[] — Action elements
  • extraReactNode — Extra content area

List.Item.Meta Props

  • avatarReactNode — Avatar element
  • titleReactNode — Item title
  • descriptionReactNode — Item description