package.src.vaadin-virtual-list.d.ts Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of virtual-list Show documentation
Show all versions of virtual-list Show documentation
Web Component for displaying a virtual/infinite list of items.
/**
* @license
* Copyright (c) 2021 - 2024 Vaadin Ltd.
* This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
*/
import { ElementMixin } from '@vaadin/component-base/src/element-mixin.js';
import { ThemableMixin } from '@vaadin/vaadin-themable-mixin/vaadin-themable-mixin.js';
import type {
VirtualListDefaultItem,
VirtualListItemModel,
VirtualListMixinClass,
VirtualListRenderer,
} from './vaadin-virtual-list-mixin.js';
export { VirtualListDefaultItem, VirtualListItemModel, VirtualListRenderer };
/**
* `` is a Web Component for displaying a virtual/infinite list of items.
*
* ```html
*
* ```
*
* ```js
* const list = document.querySelector('vaadin-virtual-list');
* list.items = items; // An array of data items
* list.renderer = (root, list, {item, index}) => {
* root.textContent = `#${index}: ${item.name}`
* }
* ```
*
* The following state attributes are available for styling:
*
* Attribute | Description
* -----------------|--------------------------------------------
* `overflow` | Set to `top`, `bottom`, both, or none.
*
* See [Virtual List](https://vaadin.com/docs/latest/components/virtual-list) documentation.
*
* @extends HTMLElement
* @mixes ElementMixin
* @mixes ThemableMixin
* @mixes VirtualListMixin
*/
declare class VirtualList extends ThemableMixin(ElementMixin(HTMLElement)) {}
interface VirtualList extends VirtualListMixinClass {}
declare global {
interface HTMLElementTagNameMap {
'vaadin-virtual-list': VirtualList;
}
}
export { VirtualList };
© 2015 - 2025 Weber Informatics LLC | Privacy Policy