Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Request] Sticky navbar affixed to container on scroll #2051

Closed
RDhar opened this issue Aug 14, 2018 · 10 comments
Closed

[Request] Sticky navbar affixed to container on scroll #2051

RDhar opened this issue Aug 14, 2018 · 10 comments
Labels

Comments

@RDhar
Copy link

RDhar commented Aug 14, 2018

This is a feature request for Bulma CSS framework.

Description

Following the introduction of the Fixed Navbar feature by #326, would it be possible to include a sticky navbar which affixes to the top/bottom of its container upon reaching a certain scroll threshold? Optionally, it could be expanded upon to hide the navbar on scroll down and reveal upon scrolling up?

Examples

Thanks for your time and consideration as well my huge appreciation for the work that has gone into this project so far. Hope you have a great day!

@jgthms
Copy link
Owner

jgthms commented Aug 14, 2018

You would need JS for that, which Bulma doesn’t provides.

@VizuaaLOG
Copy link

Hey @RDhar,

I maintain a Javascript extension to Bulma called BulmaJS. If you would like this as a feature please file a feature request within the issues on the.BulmaJS Repo

If course if you're instead using Vue or React there are Bulma extensions for those as well.

@RDhar
Copy link
Author

RDhar commented Aug 14, 2018

@jgthms I was afraid that might be the case. However, I did look into this a bit more and, at the risk of repeating myself, I think this might be within the realms of possibility for a CSS-only implementation using the position: sticky property. Case in point, this CSS-Tricks article as well this CodePen demo. Surely this would make it eligible for the Bulma CSS framework?

@VizuaaLOG Thank you for your suggestion, much appreciated. As requested, I've created issue #49 on the BulmaJS repo to address this. Since you mentioned it, I'm quite interested in a React solution. How would I go about finding such extensions?

Thanks to both of you for your time.

@VizuaaLOG
Copy link

Thank you I'll add that to my task list. There are a bunch of other related projects within the readme. For example there is Re-Bulma and React-bulma

I'm not that familiar with react as I personally do not use it, but those two may be helpful if you're working on a react project.

@stale
Copy link

stale bot commented Feb 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 11, 2019
@RDhar
Copy link
Author

RDhar commented Feb 11, 2019

Although, Bulma CSS framework hasn't picked it up, it appears to be implemented by @VizuaaLOG's BulmaJS project. Thanks!

@stale stale bot removed the stale label Feb 11, 2019
@jgthms
Copy link
Owner

jgthms commented May 17, 2019

We could create .is-sticky-top helper for the navbar.

@kevbarns
Copy link
Contributor

Hello ! indeed, it would be great to have a helper to fix an element according to its parent and stay displayed during the scroll. (like a navbar inside the content, not at the top or bottom like the current navbar).

In any case, great framework !

Best,

@Daeer-Projects
Copy link

Hello,
Would this also work for headers in tables?

More specifically tables that are rendered in the table-container div. I have done some work to implement this in a table, but having a .is-sticky-top modifier on the table would make it more generic, as long as the element being rendered is in a container class.

Thanks!

@stale
Copy link

stale bot commented Jun 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 8, 2020
@stale stale bot closed this as completed Jun 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants