Home / File/ columns.tsx — ui Source File

columns.tsx — ui Source File

Architecture documentation for columns.tsx, a tsx file in the ui codebase. 9 imports, 1 dependents.

File tsx ApplicationExhibition 9 imports 1 dependents

Entity Profile

Dependency Diagram

graph LR
  43b33977_407a_3859_0d77_dc087ee891e4["columns.tsx"]
  13d2cdc2_fcbd_c4c7_04e9_fa2d55632727["data.tsx"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 13d2cdc2_fcbd_c4c7_04e9_fa2d55632727
  4fe23e67_e3df_d42e_5cc2_9cd68df31da0["schema.ts"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 4fe23e67_e3df_d42e_5cc2_9cd68df31da0
  ac7d025e_c65b_8066_4ef7_9fc6b0584275["data-table-column-header.tsx"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> ac7d025e_c65b_8066_4ef7_9fc6b0584275
  1e742bf9_ae97_4443_5933_b98ef306909e["DataTableColumnHeader"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 1e742bf9_ae97_4443_5933_b98ef306909e
  44065ac3_d397_103c_a19c_808248c8f43d["data-table-row-actions.tsx"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 44065ac3_d397_103c_a19c_808248c8f43d
  403c615b_5d8a_4772_f2a7_872dfdf059a4["DataTableRowActions"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 403c615b_5d8a_4772_f2a7_872dfdf059a4
  eff11612_0b61_f7f9_e13e_9117a7062bb3["react-table"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> eff11612_0b61_f7f9_e13e_9117a7062bb3
  4c79c55d_d834_3cdd_ce17_cc4f4eb47d55["badge"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 4c79c55d_d834_3cdd_ce17_cc4f4eb47d55
  4f6bcac7_12b3_b724_9762_64ace071aa20["checkbox"]
  43b33977_407a_3859_0d77_dc087ee891e4 --> 4f6bcac7_12b3_b724_9762_64ace071aa20
  72b91fa7_3248_60fe_d7b8_35d6ea4bc552["page.tsx"]
  72b91fa7_3248_60fe_d7b8_35d6ea4bc552 --> 43b33977_407a_3859_0d77_dc087ee891e4
  style 43b33977_407a_3859_0d77_dc087ee891e4 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

"use client"

import { type ColumnDef } from "@tanstack/react-table"

import { Badge } from "@/registry/new-york-v4/ui/badge"
import { Checkbox } from "@/registry/new-york-v4/ui/checkbox"

import { labels, priorities, statuses } from "../data/data"
import { type Task } from "../data/schema"
import { DataTableColumnHeader } from "./data-table-column-header"
import { DataTableRowActions } from "./data-table-row-actions"

export const columns: ColumnDef<Task>[] = [
  {
    id: "select",
    header: ({ table }) => (
      <Checkbox
        checked={
          table.getIsAllPageRowsSelected() ||
          (table.getIsSomePageRowsSelected() && "indeterminate")
        }
        onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
        aria-label="Select all"
        className="translate-y-[2px]"
      />
    ),
    cell: ({ row }) => (
      <Checkbox
        checked={row.getIsSelected()}
        onCheckedChange={(value) => row.toggleSelected(!!value)}
        aria-label="Select row"
        className="translate-y-[2px]"
      />
    ),
    enableSorting: false,
    enableHiding: false,
  },
  {
    accessorKey: "id",
    header: ({ column }) => (
      <DataTableColumnHeader column={column} title="Task" />
    ),
    cell: ({ row }) => <div className="w-[80px]">{row.getValue("id")}</div>,
    enableSorting: false,
    enableHiding: false,
  },
  {
    accessorKey: "title",
    header: ({ column }) => (
      <DataTableColumnHeader column={column} title="Title" />
    ),
    cell: ({ row }) => {
      const label = labels.find((label) => label.value === row.original.label)

      return (
        <div className="flex gap-2">
          {label && <Badge variant="outline">{label.label}</Badge>}
          <span className="max-w-[500px] truncate font-medium">
            {row.getValue("title")}
          </span>
// ... (64 more lines)

Frequently Asked Questions

What does columns.tsx do?
columns.tsx is a source file in the ui codebase, written in tsx. It belongs to the ApplicationExhibition domain.
What does columns.tsx depend on?
columns.tsx imports 9 module(s): DataTableColumnHeader, DataTableRowActions, badge, checkbox, data-table-column-header.tsx, data-table-row-actions.tsx, data.tsx, react-table, and 1 more.
What files import columns.tsx?
columns.tsx is imported by 1 file(s): page.tsx.
Where is columns.tsx in the architecture?
columns.tsx is located at apps/v4/app/(app)/examples/tasks/components/columns.tsx (domain: ApplicationExhibition, directory: apps/v4/app/(app)/examples/tasks/components).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free