Skip to content

Add option to sticky header row in tables#4134

Merged
peterwhite merged 19 commits intomainfrom
peter/rnd-6756-add-option-to-freeze-columns-andor-rows-in-tables
Mar 25, 2026
Merged

Add option to sticky header row in tables#4134
peterwhite merged 19 commits intomainfrom
peter/rnd-6756-add-option-to-freeze-columns-andor-rows-in-tables

Conversation

@peterwhite
Copy link
Copy Markdown
Contributor

@peterwhite peterwhite commented Mar 23, 2026

Adds the ability to apply a sticky header row to a table.

Due to the requirement for horizontal scrolling and page-level stickiness, a JS approach is required rather than purely CSS. A consistent approach is also taken in the editor (PR here).

Other changes:

  • Fix border radius behaviour for horizontally scrollable tables
  • Minor refactors around table layout and styling
  • Moving styling to Tailwind where supported

Demos:

Horizontal scrolling tables before:
image

Horizontal scrolling tables after:
image

Page-level sticky table headers:

GBO.Demo.3.mov

@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 23, 2026

🦋 Changeset detected

Latest commit: 152b206

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@argos-ci
Copy link
Copy Markdown

argos-ci Bot commented Mar 23, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2-cloudflare (Inspect) 👍 Changes approved 4 removed Mar 25, 2026, 12:54 PM
customers-v2-vercel (Inspect) 👍 Changes approved 2 changed, 4 removed Mar 25, 2026, 12:53 PM
v2-cloudflare (Inspect) 👍 Changes approved 3 changed Mar 25, 2026, 12:59 PM
v2-vercel (Inspect) 👍 Changes approved 10 changed Mar 25, 2026, 12:58 PM

@peterwhite peterwhite marked this pull request as ready for review March 23, 2026 12:46
Comment thread packages/gitbook/src/components/DocumentView/Table/layout.ts
Comment thread packages/gitbook/src/components/DocumentView/Table/table.module.css Outdated
@peterwhite peterwhite merged commit 16bfafe into main Mar 25, 2026
17 checks passed
@peterwhite peterwhite deleted the peter/rnd-6756-add-option-to-freeze-columns-andor-rows-in-tables branch March 25, 2026 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants