datasette-sticky-table-headers
Keep Datasette table headers visible while scrolling.
This plugin is especially useful when exploring wide or unfamiliar datasets: column names stay in view while you scroll down table listings, database table previews, and SQL query results.
If you know this feature from spreadsheets, it is similar to "freeze top row" or "freeze header row": column names remain visible while you scroll through long or wide tables.
Installation
Install the plugin in the same environment as Datasette:
datasette install datasette-sticky-table-headers
For local development from this checkout:
pip install -e . --no-build-isolation
Usage
Run Datasette as normal. The plugin is enabled automatically:
datasette data.db
It injects a small script on Datasette table, database, and SQL query pages.
That script adds CSS targeting thead header cells in Datasette result tables,
so the header row sticks to the top of the browser viewport while the page
scrolls.
.rows-and-columns thead th {
position: sticky;
top: 0;
}
The plugin also makes Datasette's table wrappers use normal page scrolling rather than a separate vertical scroll box, which lets sticky headers pin to the browser viewport.
Screenshots
The screenshot shows a Datasette table page scrolled down with the column headers still visible at the top of the page.
Compatibility and limitations
Tested with Datasette 0.65.2. The plugin uses Datasette's extra_body_script
hook and standard Datasette table markup, so it should also work with nearby
Datasette versions that render result tables with thead elements and the
rows-and-columns class.
The CSS intentionally targets only thead cells. It does not use a
tr:first-child fallback, because that can accidentally make the first data row
sticky on result tables without a header section.
The header background is white. Datasette themes or custom CSS with non-white table backgrounds may need a small override.
Metadata
Release files for datasette-sticky-table-headers 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datasette_sticky_table_headers-0.1.1.tar.gz | 282.8 kB | Without provenance | Details for datasette_sticky_table_headers-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datasette_sticky_table_headers-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for datasette_sticky_table_headers-0.1.1-py3-none-any.whl |
Total release size: 286.8 kB
Release files / datasette_sticky_table_headers-0.1.1.tar.gz
| Download URL | datasette_sticky_table_headers-0.1.1.tar.gz |
|---|---|
| Size | 282.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f427e73e94fd1268597e66d95ffeaf986c59be0ad638bdf6fb1699b6b35c155
|
|
BLAKE2b-256 checksum How to use checksums |
adb524ad5e40ece35a5d312bd5fd211b61874b93d12598d6c95ca7557fcd0951
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Release files / datasette_sticky_table_headers-0.1.1-py3-none-any.whl
| Download URL | datasette_sticky_table_headers-0.1.1-py3-none-any.whl |
|---|---|
| Size | 4.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
777e9be6d0760d7662e7e70fd2bf5dd294ff32c707cedc9c2087da6dc67d0715
|
|
BLAKE2b-256 checksum How to use checksums |
60aa45de66e20a52e535095617486137fc53949e352e88a11253f10b1bfd1db9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.9
|
Security for datasette-sticky-table-headers 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.