BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/inferencesh/virtualize

Virtualize

inferencesh/virtualize
FreeBlock

Typed virtualization with measurement strategies, incremental caching, and scroll correction.

Live preview

live · rendered by the registry
Rendered by inferencesh on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://ui.inference.sh/r/virtualize.json

Source

lib/virtualize/types.tsui.inference.sh/r/virtualize.json
1export type MeasureStrategy =
2 | FixedStrategy
3 | CappedStrategy
4 | ComputedStrategy
5
6// Height is always the same regardless of content or width.
7// Examples: buttons, pills, status indicators, headers.
8export type FixedStrategy = {
9 kind: 'fixed'
10 height: number
11}
12
13// Content scrolls inside a capped container.
14// Height is min(estimatedContent, maxHeight).
15// Examples: JSON preview, log viewer, reasoning block.
16export type CappedStrategy = {
17 kind: 'capped'
18 maxHeight: number
19 // If you can estimate content height cheaply (e.g. lineCount * lineHeight),
20 // provide it. Otherwise the cap is used as the height.
21 estimateContent?: number
22}
23
24// Height is deterministic from props — pure arithmetic, no DOM.
25// Examples: list of N items × row height, grid of N columns.
26export type ComputedStrategy = {
27 kind: 'computed'
28 measure: (width: number) => number
29}
30
31// --- Virtualisable item ---
32
33export type VirtualItem<T = unknown> = {
34 id: string | number
35 strategy: MeasureStrategy
36 data: T
37}
38
39// --- Resolved item (after measurement) ---
40
41export type PositionedItem<T = unknown> = {
42 id: string | number
43 data: T
44 height: number
45 y: number
46}

Files it writes

  • lib/virtualize/types.ts
  • lib/virtualize/measure.ts
  • lib/virtualize/use-virtualized-list.ts
  • lib/virtualize/index.ts
  • hooks/use-virtualize.ts

Facts

Registry
inferencesh
Type
registry:block
Access
Free
Files written
5
Licence
the repository states none
First indexed
2026-08-02
Last confirmed
yesterday

Go to the source

Docs on inferencesh ui.inference.sh Raw registry item This item as JSON

More from inferencesh

All 14 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Agent ChatagentinferenceshBlocksFree1 dep
Chat UI PrimitiveschatinferenceshBlocksFree1 dep · 15 files
Code Blockcode-blockinferenceshBlocksFreeno deps · 7 files
Markdown Renderer (legacy)markdowninferenceshBlocksFree2 deps · 2 files
pretext-mdpretext-mdinferenceshBlocksFree4 deps · 10 files
Sidebar Lightsidebar-lightinferenceshBlocksFreeno deps
StepsstepsinferenceshBlocksFreeno deps · 2 files
Table of Contentstable-of-contentsinferenceshBlocksFreeno deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex