Sticky Column

Sticky table column wrapper that pins content to the left or right edge with a solid background and divider while the rest of a wide table scrolls horizontally.

src/registry/ui/sticky-column.tsx/r/sticky-column.json

Installation#

bash
npx shadcn@latest add @minidev/sticky-column

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/sticky-column.json

Usage#

tsx
import { StickyColumn } from "@/components/ui/sticky-column"

export function Example() {
  return <StickyColumn />
}

API reference#

StickyColumn props
PropTypeDefault
children*React.ReactNode-
side"left" | "right""left"
classNamestring-

* required

All data table components

Learn more