Row

February 6, 2026 · View on GitHub

Displays a single line of structured content with an optional checkbox, leading element, extra content area, context menu and badges.

Import

import { Row } from "@docspace/ui-kit/components/rows";

Usage

const contextOptions = [
  { key: "rename", label: "Rename" },
  { key: "delete", label: "Delete" },
];

<Row
  checked={false}
  contextOptions={contextOptions}
  onSelect={(nextChecked) => console.log("checked", nextChecked)}
  onRowClick={() => console.log("row click")}
>
  <Text truncate>Document.docx</Text>
</Row>;

Modern mode with element

<Row
  mode="modern"
  checked
  element={<Avatar size={AvatarSize.min} role={AvatarRole.user} userName="Alex" />}
  contextOptions={contextOptions}
>
  <Text truncate>Workspace</Text>
</Row>

Props

PropTypeDefaultDescription
checkedbooleanWhen provided, renders the checkbox (default mode) or the styled checkbox container (modern mode).
childrenReact.ReactElement<{ item: RowItemType }>Main content block. If the element exposes an item prop, its data is reused inside the context menu header.
classNamestringCustom class name added to the root wrapper.
contentElementReact.ReactNodeAdditional element rendered near the context area (e.g., actions, tags).
contextButtonSpacerWidthstring"26px"Controls the width reserved for the context menu button via a CSS custom property.
contextOptionsContextMenuModel[]Options shown in the contextual menu. When omitted, an empty placeholder replaces the button.
data{ contextOptions: ContextMenuModel[] }Alternative place to keep contextOptions together with other row metadata.
elementReact.ReactElementLeading element (avatar, icon, combobox, etc.). In modern mode it shares the container with the checkbox.
idstringDOM id for the wrapper.
indeterminatebooleanShows the checkbox in an indeterminate state.
onSelect(checked: boolean, data?: unknown) => voidCalled when the checkbox (or leading element on mobile) toggles its state. Receives the next checked value and row data.
onRowClick(e: React.MouseEvent) => voidFired when any part of the row except the checkbox and context button is clicked.
onContextClick(openedViaRightClick?: boolean) => voidFired when the context button or right click triggers the context menu.
styleReact.CSSPropertiesInline styles for the wrapper.
inProgressbooleanReplaces the regular content with a loader when true.
getContextModel() => ContextMenuModel[]Lazily provides menu items for the floating ContextMenu component.
mode"default" | "modern""default"Switches layout between the classic checkbox-first row and the modern combined element/checkbox container.
withoutBorderbooleanfalseHides the default row borders.
isIndexEditingModebooleanDisplays index control buttons instead of the context menu button.
isRoombooleanMarks the row context as a room (affects ContextMenu styling).
contextTitlestringOptional title displayed inside the context menu button tooltip.
badgesComponentReact.ReactNodeCustom badges displayed near the context button.
isArchivebooleanMarks the context menu as originating from an archived entity.
rowContextClose() => voidCallback fired when the floating context menu hides.
badgeUrlstringOptional badge image URL passed to the context menu.
isDisabledbooleanDisables the checkbox interaction.
onChangeIndex(action: VDRIndexingAction) => voidHandles clicks on index-increase/decrease buttons when isIndexEditingMode is enabled.
itemRowItemTypeData object forwarded to children to describe avatars/icons/titles.
dataTestIdstringCustom data-testid attribute (defaults to row).