A scrolling box with a styled scrollbar.

Files

Notes 8 KB
Roadmap 45 KB
Report 82 KB
Brief 119 KB
Draft 36 KB
Notes 73 KB
Roadmap 110 KB
Report 27 KB
Brief 64 KB
Draft 101 KB
Notes 18 KB
Roadmap 55 KB
Report 92 KB
Brief 9 KB
Draft 46 KB
Notes 83 KB
Roadmap 120 KB
Report 37 KB
Brief 74 KB
Draft 111 KB
Notes 28 KB
Roadmap 65 KB
Report 102 KB
Brief 19 KB
Draft 56 KB
Notes 93 KB
Roadmap 10 KB
Report 47 KB
Brief 84 KB
Draft 121 KB

Usage

Example.svelte
<script lang="ts">
	import { ScrollArea } from "@orochibraru/ui/scroll-area";
	import { Separator } from "@orochibraru/ui/separator";

	const files = Array.from({ length: 30 }, (_, i) => ({
		id: i + 1,
		name: ["Notes", "Roadmap", "Report", "Brief", "Draft"][i % 5],
		size: ((i * 37) % 120) + 8,
	}));
</script>

<ScrollArea class="h-72 rounded-md border">
	<div class="p-4">
		<h4 class="mb-4 text-sm font-medium">Files</h4>
		{#each files as file (file.id)}
			<div class="flex justify-between text-sm">
				<span>{file.name}</span>
				<span class="text-muted-foreground">{file.size} KB</span>
			</div>
			<Separator class="my-2" />
		{/each}
	</div>
</ScrollArea>