logoAnt Design

⌘ K
  • Design
  • Development
  • Components
  • Blog
  • Resources
YouMindTRACTIANLobeHubCodeRabbit
6.6.0
  • Components Overview
  • Changelog
    v6.6.0
  • General
    • Button
    • FloatButton
    • Icon
    • Typography
  • Layout
    • Divider
    • Flex
    • Grid
    • Layout
    • Masonry
      6.0.0
    • Space
    • Splitter
  • Navigation
    • Anchor
    • Breadcrumb
    • Dropdown
    • Menu
    • Pagination
    • Steps
    • Tabs
  • Data Entry
    • AutoComplete
    • Cascader
    • Checkbox
    • ColorPicker
    • DatePicker
    • Form
    • Input
    • InputNumber
    • Mentions
    • Radio
    • Rate
    • Select
    • Slider
    • Switch
    • TimePicker
    • Transfer
    • TreeSelect
    • Upload
  • Data Display
    • Avatar
    • Badge
    • Calendar
    • Card
    • Carousel
    • Collapse
    • Descriptions
    • Empty
    • Image
    • List
      DEPRECATED
    • Listy
      6.6.0
    • Popover
    • QRCode
    • Segmented
    • Statistic
    • Table
    • Tag
    • Timeline
    • Tooltip
    • Tour
    • Tree
  • Feedback
    • Alert
    • Drawer
    • Message
    • Modal
    • Notification
    • Popconfirm
    • Progress
    • Result
    • Skeleton
    • Spin
    • Watermark
  • Other
    • Affix
    • App
    • BorderBeam
      6.4.0
    • ConfigProvider
    • Util
When To Use
Examples
Basic
Virtual scrolling
Grouping and sticky headers
Rich content
Infinite loading
Custom semantic dom styling
API
Group
Ref
Semantic DOM
Design Token

Listy

A high-performance list that supports grouping and can virtualize long data sets.
Importimport { Listy } from 'antd';
GitHub
components/listyIssueOpen issues
Docs
Edit this pageLLMs.md
Versionsupported since 6.6.0
ListPopover

Resources

Ant Design X
Ant Design Charts
Ant Design Pro
Pro Components
Ant Design Mobile
Ant Design Mini
Ant Design Web3
Ant Design Landing-Landing Templates
Scaffolds-Scaffold Market
Umi-React Application Framework
dumi-Component doc generator
qiankun-Micro-Frontends Framework
Ant Motion-Motion Solution
China Mirror 🇨🇳

Community

Awesome Ant Design
Medium
X
yuque logoAnt Design in YuQue
Ant Design in Zhihu
Experience Cloud Blog
seeconf logoSEE Conf-Experience Tech Conference

Help

GitHub
Change Log
FAQ
For Agents
Bug Report
Issues
Discussions
StackOverflow
SegmentFault

Ant XTech logoMore Products

yuque logoYuQue-Document Collaboration Platform
AntV logoAntV-Data Visualization
Egg logoEgg-Enterprise Node.js Framework
Kitchen logoKitchen-Sketch Toolkit
Galacean logoGalacean-Interactive Graphics Solution
WeaveFox logoWeaveFox-AI Development with WeaveFox 🦊
xtech logoAnt Financial Experience Tech
Theme Editor
Made with ❤ by
Ant Group and Ant Design Community
loading

When To Use

  • When you need to render a long list without paying the cost of mounting every row — enable virtual to render only the rows in view.
  • When the list needs grouped sections with sticky headers.
  • When you need imperative control over scroll position (jump to an item, a group, or a pixel offset).

Examples

API

Listy component is available since antd@6.6.0.

Common props ref: Common props

PropertyDescriptionTypeDefaultVersionGlobal Config
classNamesSemantic class names{ root?, item?, groupHeader? }-6.6.06.6.0
groupGrouping config, see Group belowGroup<T, K>-6.6.0×
heightHeight of the scroll container; content scrolls when it overflowsnumber-6.6.0×
itemRenderRender a single row(item: T, index: number) => ReactNode-6.6.0×
itemsData source of the listT[][]6.6.0×
rowKeyUnique key of an item, a field name or a getterkeyof T | (item: T) => Key-6.6.0×
stickyWhether group headers stick to the topbooleanfalse6.6.0×
stylesSemantic inline styles{ root?, item?, groupHeader? }-6.6.06.6.0
virtualWhether to enable virtual scrolling, rendering only rows in view, requires heightbooleanfalse6.6.0×
onScrollNative scroll event handlerReact.UIEventHandler<HTMLElement>-6.6.0×

Group

PropertyDescriptionType
keyCompute the group key an item belongs to; items with the same key are grouped together(item: T) => K
titleRender the group header; receives the group key and its items(groupKey: K, items: T[]) => ReactNode

Ref

NameDescriptionType
scrollToScroll to a position, an item, or a group(config?: ListyScrollToConfig) => void

ListyScrollToConfig is one of:

ShapeDescription
numberScroll to a pixel offset (scrollTop)
{ top?, left? }Scroll to an absolute pixel position
{ key, align?, offset? }Scroll to the item whose rowKey matches key
{ groupKey, align?, offset? }Scroll to a group header

align is 'top' | 'bottom' | 'auto'; offset is an extra pixel offset applied after alignment.

Semantic DOM

Design Token

Component TokenHow to use?
Token NameDescriptionTypeDefault Value
itemPaddingBlockVertical padding of a list item.number12
itemPaddingInlineHorizontal padding of a list item.number16
Global TokenHow to use?
Token NameDescriptionTypeDefault Value
colorBgContainerContainer background color, e.g: default button, input box, etc. Be sure not to confuse this with `colorBgElevated`.string#ffffff
colorFillAlterControl the alternative background color of element.stringrgba(0,0,0,0.02)
colorSplitUsed as the color of separator, this color is the same as colorBorderSecondary but with transparency.stringrgba(5,5,5,0.06)
colorTextDefault text color which comply with W3C standards, and this color is also the darkest neutral color.stringrgba(0,0,0,0.88)
colorTextDescriptionControl the font color of text description.stringrgba(0,0,0,0.45)
controlItemBgHoverControl the background color of control component item when hovering.stringrgba(0,0,0,0.04)
fontFamilyThe font family of Ant Design prioritizes the default interface font of the system, and provides a set of alternative font libraries that are suitable for screen display to maintain the readability and readability of the font under different platforms and browsers, reflecting the friendly, stable and professional characteristics.string-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'
fontSizeThe most widely used font size in the design system, from which the text gradient will be derived.number14
fontWeightStrongControl the font weight of heading components (such as h1, h2, h3) or selected item.number600
lineHeightLine height of text.number1.5714285714285714
lineTypeBorder style of base componentsstringsolid
lineWidthBorder width of base componentsnumber1
motionDurationMidMotion speed, medium speed. Used for medium element animation interaction.string0.2s
motionEaseInOutPreset motion curve.string
Cubic Bezier Visualizer
cubic-bezier(0.645, 0.045, 0.355, 1)External Link Icon
paddingXSControl the extra small padding of the element.number8
Basic

Basic example.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Virtual scrolling

A long list of 10,000 rows. Set virtual and height to enable virtual scrolling, so only the rows in view are rendered.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Grouping and sticky headers

Use group to derive a group key from each item and render group headers. With sticky enabled, the current group header sticks to the top while scrolling.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Rich content

itemRender can render arbitrarily rich content, and rows do not need the same height.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Infinite loading

Detect in onScroll that the list is about to reach the bottom, then load the next page on demand for endless scrolling. Combined with virtual, only the rows in view are rendered no matter how much data piles up.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Custom semantic dom styling

Customize the semantic DOM styles of Listy with classNames and styles.

CodeSandbox Icon
Hitu Icon
codepen icon
External Link Icon
Expand Icon
Item 0
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
Item 10
Item 11
Item 12
Item 13
Item 14
Item 15
Item 16
Item 17
Item 18
Item 19
Item 0
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
A
AAaron Baker
AAlice Adams
B
BBella Carter
BBrian Diaz
C
CChloe Evans
CColin Foster
D
DDaisy Garcia
DDavid Hayes
E
EElena Ingram
EEric Jensen
F
FFiona Kim
FFrank Lopez
G
GGrace Miller
GGavin Nguyen
H
HHannah Ortiz
HHenry Parker
I
IIris Quincy
IIvan Reed
J
JJack Smith
JJulia Turner
O
Olivia08:00
commented on your merge request
L
Liam09:17
invited you to the quarterly planning review. Please confirm your availability before Friday so the agenda can be finalized in time.
E
Emma10:34
mentioned you in the design review thread
N
Noah11:51
assigned you a task that is due next Monday. It covers the remaining accessibility issues found in the latest audit.
A
Ava12:08
starred the report you shared yesterday
E
Ethan13:25
requested changes on your pull request. Most of the comments are about naming and the test coverage of the new cache layer.
S
Sophia14:42
commented on your merge request
L
Lucas15:59
invited you to the quarterly planning review. Please confirm your availability before Friday so the agenda can be finalized in time.
O
Olivia16:16
mentioned you in the design review thread
L
Liam17:33
assigned you a task that is due next Monday. It covers the remaining accessibility issues found in the latest audit.
E
Emma18:50
starred the report you shared yesterday
N
Noah19:07
requested changes on your pull request. Most of the comments are about naming and the test coverage of the new cache layer.
Item 0
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Item 7
Item 8
Item 9
50 items loaded
Design
Olivia
Liam
Emma
Engineering
Noah
Ava
Ethan
Marketing
Sophia
Lucas
Design
Olivia
Liam
Emma
Engineering
Noah
Ava
Ethan
  • root
    Root element, the scroll container, with font and relative positioning
  • item
    Item element, with padding, split line and hover background
  • groupHeader
    Group header element, with sticky positioning and background color