Horizontal List
#0 Tako 4730
#1 Ebi 0445
#2 Saba 2784
#3 Iwashi 4337
#4 Maguro 1147
#5 Tekka 6880
<script lang="ts">
import { VirtualList, type VLSlotSignature } from 'svelte-virtuallists';
import { getRandomSushi } from '../sushi';
const myModel = new Array(10000).fill(1).map((v, i) => {
return { text: '#' + i + ' ' + getRandomSushi() };
});
</script>
<VirtualList items={myModel} style="width:100%" isHorizontal={true}>
{#snippet vl_slot({ item }: VLSlotSignature<(typeof myModel)[0]>)}
<div style="border: 1px solid rgb(204, 204, 204)">
{item.text}
</div>
{/snippet}
</VirtualList>
previous Vertical
next Table/Grid