K
Docs
API ReferencePiecesSlice List
🍰

Slice List

base.list.sliceBase SetUtility

Returns a slice of a list from a start index up to (but not including) an end index. Use it for top-10 boards, paging, or trimming edges.

On the canvas

This is what Slice List looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

🍰
Slice List
base.list.slice
Utility
listrequired
{{result}}
start
0
end
10
asrequired
top10

Config fields

FieldTypeReqWhat it does
list
{{result}}
textyesList 📋
start
0
textStart index
end
10
textEnd index (exclusive)
as
top10
textyesSave sublist as ✨

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{slice}}arrayList slice
{{slice.length}}numberNumber of items in slice
{{slice.0}}stringFirst item in slice

Output ports

outputSublist spark is ready
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
const top10 = list.slice(start, end);
// slice(0, 10) — {{top10}}