KitContentList
Virtualized content list with headings, excerpts, metadata and thumbnails.

Supply a ContentItem model, a generation and active-index. Handle activate(token, generation) to open content and navigate to move the active item.
Rows use a bounded height and materialize only the viewport. Selection and disabled state come from the model; the active index serves geometry, never domain identity.
Complete example
This complete Slint file is a visual composition used to produce the screenshot above. Internal strings without a label property retain the kit’s default language; system dialogs follow the host platform. Projected state and callbacks requesting a decision need host wiring; the standalone fixture does not supply that controller. Set up the Rust project, then see the typed controller application for working editing, validation and selection.
// SPDX-License-Identifier: GPL-3.0-or-later
import { KitContentList, KitTheme, KitThemes } from "@kit/kit.slint";
export component Example inherits Window {
title: "KitContentList example";
preferred-width: 620px;
preferred-height: 410px;
max-width: 100000px;
max-height: 100000px;
background: root.theme.canvas;
in-out property <KitTheme> theme: KitThemes.light;
in-out property <string> status;
VerticalLayout {
padding: 24px; spacing: 16px; alignment: start;
Text { text: "Content List"; color: root.theme.text-primary; font-size: 20px * root.theme.text-scale; font-weight: 600; }
KitContentList { theme: root.theme; height: 260px; generation: 1; items: [{ token: 101, title: "A guide to native design", excerpt: "Build interfaces that feel at home on the desktop.", metadata: "Design · 5 min read", link-label: "Read article", selected: false, disabled: false }, { token: 205, title: "Keep domain values exact", excerpt: "Use validated values and stable application identity.", metadata: "Engineering · 8 min read", link-label: "Read article", selected: false, disabled: false }]; }
if root.status != "": Text { text: root.status; color: root.theme.text-secondary; font-size: 12px * root.theme.text-scale; wrap: word-wrap; }
}
}
Public API
Inherits Rectangle.
The declarations below come from the component source. Parent properties remain available; see the controller guide for state management.
Properties
| Name | Type | Direction |
|---|---|---|
theme |
KitTheme |
in |
items |
[ContentItem] |
in |
generation |
int |
in |
active-index |
int |
in |
label |
string |
in |
scroll-y |
length |
out |
Types and variants
Names below use Slint syntax. Shared Rust domain types live in slint_kit; presentation enums come from the Rust types generated by Slint.
| Type | Declaration |
|---|---|
struct ContentItem |
token: int, title: string, excerpt: string, metadata: string, link-label: string, thumbnail: image, selected: bool, disabled: bool |
enum NavigationStep |
next, previous, first, last, page-next, page-previous |
Callbacks
activate(int,int)navigate(NavigationStep)
Functions
take-focus()