Components
List

List

A versatile list component for presenting content in an organized manner.

Import

import { VKList } from "@vivakits/react-components";

Basic Usage

The basic list displays items in a clean, organized format.

  • Two roads diverged in a yellow wood,
  • And sorry I could not travel both
  • And be one traveler, long I stood
  • And looked down one as far as I could
  • To where it bent in the undergrowth;

List with Icons

Lists can include icons or bullets for each item.

Size

Lists can be rendered in different sizes.

Defaul Size

  • Jony Jony Yes Papa
  • Eating sugar No Papa
  • Telling lies No Papa
  • Open your mouth Ha! Ha! Ha!

Small Size

  • Jony Jony Yes Papa
  • Eating sugar No Papa
  • Telling lies No Papa
  • Open your mouth Ha! Ha! Ha!

Large Size

  • Jony Jony Yes Papa
  • Eating sugar No Papa
  • Telling lies No Papa
  • Open your mouth Ha! Ha! Ha!

Grid

List can be show in grid view.

  • Title 1

    Card content

  • Title 2

    Card content

  • Title 3

    Card content

Responsive Grid

List can be show in responsive grid view.

  • Title 1

    Card content

  • Title 2

    Card content

  • Title 3

    Card content

  • Title 4

    Card content

  • Title 5

    Card content

Load More

List can be show more items by clicking on the load more button.

API Reference

List

AttributeTypeDescriptionDefault
borderedbooleanToggles rendering of the border around the listfalse
dataSourceany[]DataSource array for list-
footerReactNodeList footer renderer-
gridobjectThe grid type of list. You can set grid to something like-
headerReactNodeList header renderer-
itemLayouthorizontalverticalThe layout of listhorizontal
loadingbooleanShows a loading indicator while the contents of the list are being fetchedfalse
loadMoreReactNodeShows a load more content-
localeobjectThe i18n text including empty text-
paginationbooleanobjectPagination config, hide it by setting it to falsefalse
renderItem(item) => ReactNodeCustomize list item when using dataSource-
rowKeykeyof T (item: T) => React.KeyItem'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.Key"key"
sizedefaultlargesmallSize of listdefault
splitbooleanToggles rendering of the split under the list item true

Pagination

AttributeTypeDescriptionDefault
positiontopbottombothThe specify the position of Paginationbottom
alignstartcenterendThe specify the alignment of Paginationend

List grid props

AttributeTypeDescriptionDefault
columnnumberThe column of grid-
gutternumberThe spacing between grid0
xsnumber<576px column of grid-
smnumber≥576px column of grid-
mdnumber≥768px column of grid-
lgnumber≥992px column of grid-
xlnumber≥1200px column of grid-
xxlnumber≥1600px column of grid-

List.Item

AttributeTypeDescriptionDefault
actionsArray<ReactNode>The actions content of list item. If itemLayout is vertical, shows the content on bottom, otherwise shows content on the far right-
classNamesRecord<actions extra, string>Semantic structure className-
extraReactNodeThe extra content of list item. If itemLayout is vertical, shows the content on right, otherwise shows content on the far right-
stylesRecord<actions extra, CSSProperties>Semantic DOM style-

List.Item.Meta

AttributeTypeDescriptionDefault
avatarReactNodeThe avatar of list item-
descriptionReactNodeThe description of list item-
titleReactNodeThe title of list item-