TableCellViewer() — ui Function Reference
Architecture documentation for the TableCellViewer() function in data-table.tsx from the ui codebase.
Entity Profile
Dependency Diagram
graph TD 78cc0b05_e244_64cc_dfd4_fa4f20c4dbc6["TableCellViewer()"] 8ad238ff_a39a_3d1c_9d4f_36efa918de96["data-table.tsx"] 78cc0b05_e244_64cc_dfd4_fa4f20c4dbc6 -->|defined in| 8ad238ff_a39a_3d1c_9d4f_36efa918de96 style 78cc0b05_e244_64cc_dfd4_fa4f20c4dbc6 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
apps/v4/app/(app)/examples/dashboard/components/data-table.tsx lines 650–807
function TableCellViewer({ item }: { item: z.infer<typeof schema> }) {
const isMobile = useIsMobile()
return (
<Drawer direction={isMobile ? "bottom" : "right"}>
<DrawerTrigger asChild>
<Button variant="link" className="text-foreground w-fit px-0 text-left">
{item.header}
</Button>
</DrawerTrigger>
<DrawerContent>
<DrawerHeader className="gap-1">
<DrawerTitle>{item.header}</DrawerTitle>
<DrawerDescription>
Showing total visitors for the last 6 months
</DrawerDescription>
</DrawerHeader>
<div className="flex flex-col gap-4 overflow-y-auto px-4 text-sm">
{!isMobile && (
<>
<ChartContainer config={chartConfig}>
<AreaChart
accessibilityLayer
data={chartData}
margin={{
left: 0,
right: 10,
}}
>
<CartesianGrid vertical={false} />
<XAxis
dataKey="month"
tickLine={false}
axisLine={false}
tickMargin={8}
tickFormatter={(value) => value.slice(0, 3)}
hide
/>
<ChartTooltip
cursor={false}
content={<ChartTooltipContent indicator="dot" />}
/>
<Area
dataKey="mobile"
type="natural"
fill="var(--color-mobile)"
fillOpacity={0.6}
stroke="var(--color-mobile)"
stackId="a"
/>
<Area
dataKey="desktop"
type="natural"
fill="var(--color-desktop)"
fillOpacity={0.4}
stroke="var(--color-desktop)"
stackId="a"
/>
</AreaChart>
</ChartContainer>
<Separator />
<div className="grid gap-2">
<div className="flex gap-2 leading-none font-medium">
Trending up by 5.2% this month{" "}
<IconTrendingUp className="size-4" />
</div>
<div className="text-muted-foreground">
Showing total visitors for the last 6 months. This is just
some random text to test the layout. It spans multiple lines
and should wrap around.
</div>
</div>
<Separator />
</>
)}
<form className="flex flex-col gap-4">
<div className="flex flex-col gap-3">
<Label htmlFor="header">Header</Label>
<Input id="header" defaultValue={item.header} />
</div>
<div className="grid grid-cols-2 gap-4">
Domain
Subdomains
Source
Frequently Asked Questions
What does TableCellViewer() do?
TableCellViewer() is a function in the ui codebase, defined in apps/v4/app/(app)/examples/dashboard/components/data-table.tsx.
Where is TableCellViewer() defined?
TableCellViewer() is defined in apps/v4/app/(app)/examples/dashboard/components/data-table.tsx at line 650.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free