Skip to content

RTL Layout

NextGrid uses logical 'start' and 'end' edges across columns, selection checkboxes, menus, and scrollbars so right-to-left locales work without custom CSS hacks.

const grid = new Grid<Order>({
container,
direction: 'rtl',
columnDefs: [
{ key: 'id', name: 'ID', width: 96, pinned: 'start' }, // renders on the right edge in RTL
{ key: 'customer', name: 'Customer', flex: 1 },
],
rowData,
rowSelection: { mode: 'multiple', showCheckbox: true, checkboxPinned: 'start' },
});
  • Pinning & Checkboxes: pinned: 'start' and checkboxPinned: 'start' align to the right edge; 'end' aligns to the left edge.
  • Keyboard Navigation: ArrowLeft moves visually left (to the next column in RTL) and ArrowRight moves visually right.
  • Menus & Popups: Header and body context menus anchor and flip cleanly within RTL viewports.
  • Scroll Geometry: Single-scroll-owner synchronization in SurfaceCoordinator preserves exact RTL horizontal scroll offsets.