20% offProwith

Buy now

App screenPro

Data table

shadcn add @detent-pro/data-table
Detent

Wire it up

All optional. With none, it plays exactly as it does here and hands over to whoever touches it.

Usage
<ConversationTable
  conversations={conversations}
  product={product}
  pageSize={pageSize}
  onOpen={(id) => {}}
  onAction={(action, ids) => {}}
  onNavigate={(page) => {}}
/>

Your data

conversations

The rows: who, subject, topic, status, amount, minutes since the last message, rating and a summary.

Conversation[]
Default—
product

The product’s name, in the ask bar and the summaries.

string
Default'Detent'
pageSize

Rows on a page. The body is always this many rows tall.

number
Default8
sidebar

Draw a sidebar for the rest of your app. Turn it on together with onNavigate, so every item goes somewhere.

boolean
Defaultfalse

What it tells you

onOpen

Called with a conversation a person opens.

(id: string) => void
Default—
onAction

Called when a person runs an action on rows. The script doesn’t call it.

(action: 'approve' | 'resolve' | 'assign', ids: string[]) => void
Default—
onNavigate

Called with a sidebar page a person presses. Without it the sidebar is a picture.

(page: SidebarPage) => void
Default—

Every block also takes accent, the one colour everything in it derives from; autoplay, which plays the demo until someone touches it; and className.