Flutter docs
Default skin

List

Basic list display, which can carry text, lists, pictures, paragraphs.

When to use

A list can be used to display content related to a single subject. The content can consist of multiple elements of varying type and size.

Examples

Simple list

Ceebee UI supports a default list size as well as a large and small size. If a large or small list is desired, set the size property to either large or small respectively. Omit the size property for a list with the default size. Customizing the header and footer of list by setting header and footer property.

Basic list

Basic list.

Load more

Load more list with loadMore property.

Vertical

Set the itemLayout property to vertical to create a vertical list.

Pagination Settings

List pagination can be used and set through the pagination property.

Grid

Create a grid layout by setting the grid property of List.

Responsive grid list

Responsive grid list. The size property the is as same as Layout Grid.

Scrolling loaded

The example of infinite load with react-infinite-scroll-component.

Drag sorting

By using components, we can integrate List with dnd-kit to implement drag sorting function.

Drag sorting with handler

Alternatively you can implement drag sorting with handler using dnd-kit.

Grid Drag sorting

By using custom components, we can integrate List with dnd-kit to implement drag sorting function for grid layout.

Grid Drag sorting with handler

By using custom components and drag handles, we can integrate List with dnd-kit to implement drag sorting function for grid layout.

virtual list

An example of infinite & virtualized list via using @rc-component/virtual-list.

API

List, List.Item, and List.Item.Meta are exported from @ceebee/ui/client.

List

PropertyDescriptionTypeDefaultVersion
borderedToggles rendering of the border around the listbooleanfalse—
dataSourceDataSource array for listany\[]-—
footerList footer rendererReactNode-—
gridThe grid type of list. You can set grid to something like {gutter: 16, column: 4}object-—
headerList header rendererReactNode-—
itemLayoutThe layout of listhorizontal | verticalhorizontal—
loadingShows a loading indicator while the contents of the list are being fetchedboolean | SpinProps (more)false—
loadMoreShows a load more contentReactNode-—
localeThe i18n text including empty textobject{emptyText: No Data}—
paginationPagination config, hide it by setting it to falseboolean | objectfalse—
renderItemCustomize list item when using dataSource(item: T, index: number) => ReactNode-—
rowKeyItem's unique value, could be an Item's key which holds a unique value of type React.Key or function that receives Item and returns a React.Keykeyof T | (item: T) => React.Key"key"—
sizeSize of listdefault | large | smalldefault—
splitToggles rendering of the split under the list itembooleantrue—

pagination

PropertyDescriptionTypeDefaultVersion
positionThe specify the position of Paginationtop | bottom | bothbottom—
alignThe specify the alignment of Paginationstart | center | endend—

List grid props

PropertyDescriptionTypeDefaultVersion
columnThe column of gridnumber-—
gutterThe spacing between gridnumber0—
xs<576px column of gridnumber-—
sm≥576px column of gridnumber-—
md≥768px column of gridnumber-—
lg≥992px column of gridnumber-—
xl≥1200px column of gridnumber-—
xxl≥1600px column of gridnumber-—
xxxl≥1920px column of gridnumber-6.3.0

List.Item

PropertyDescriptionTypeDefaultVersion
actionsThe actions content of list item. If itemLayout is vertical, shows the content on bottom, otherwise shows content on the far rightArray&lt;ReactNode>-—
classNamesSemantic structure classNameRecord<actions | extra, string>-5.18.0
extraThe extra content of list item. If itemLayout is vertical, shows the content on right, otherwise shows content on the far rightReactNode-—
stylesSemantic DOM styleRecord<actions | extra, CSSProperties>-5.18.0

List.Item.Meta

PropertyDescriptionTypeDefaultVersion
avatarThe avatar of list itemReactNode-—
descriptionThe description of list itemReactNode-—
titleThe title of list itemReactNode-—