
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
@cityssm/bulma-sticky-table
Advanced tools
A Bulma-friendly way to stick a table header, table footer, first column, or all three!

A Bulma-friendly way to stick a table header, table footer, first column, or all three!
Download a release, or grab the code from npm.
npm install @cityssm/bulma-sticky-table
npm install @cityssm/bulma-sticky-table@2.x
When building your stylesheet, import _sticky-table.scss AFTER you import Bulma.
This will ensure your colour customizations are used.
@import 'bulma/bulma';
@import '@cityssm/bulma-sticky-table/sticky-table';
Alternatively, if you are using Bulma without any customizations,
you can replace your Bulma stylesheet with bulma-with-sticky-tables.css.
<link
rel="stylesheet"
href="path/to/cityssm/bulma-sticky-table/bulma-with-sticky-table.css"
/>
Need a CDN? Check out JS Deliver.
Build your Bulma table as per usual, using the Bulma Table Documentation as your guide.
Then, add any combination of the following classes to your <table> tag.
Use .has-sticky-header to stick the header.
<thead> tag, and each cell should use a <th> tag.Use .has-sticky-footer to stick the footer.
<tfoot> tag, and each cell should use a <th> tag.Use .has-sticky-column to stick the first column.
<th> tag..table-containerThe Bulma .table-container wraps around a .table to assist with scrolling
around large tables. The basic idea is that the container changes the overflow
CSS rules on the container. This can affect the .table's ability to stick
as you'd expect.
While .has-sticky-column will likely work as expected,
.has-sticky-header and .has-sticky-footer may not. There are two options:
Remove the .table-container altogether, and just use the .table as is with the
desired sticky classes.
Add some additional styles to the .table-container to change the vertical overflow rule
and set a specific height on the container. The example below uses the screen height.
Something smaller may be better, depending on your application.
<div class="table-container" style="overflow-y:auto;max-height:100vh;">
<table>
<thead>
...
</thead>
<tbody>
...
</tbody>
</table>
</div>
Heavily inspired by code found on CSS-Tricks.
FAQs
A Bulma-friendly way to stick a table header, table footer, first column, or all three!
The npm package @cityssm/bulma-sticky-table receives a total of 247 weekly downloads. As such, @cityssm/bulma-sticky-table popularity was classified as not popular.
We found that @cityssm/bulma-sticky-table demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.