What's the best way to support a sticky footer using Paste? #3550
-
The Topbar component works well as a header, but its position is fixed with My current solution was to copy the Topbar component and modify the props for my needs. <Box
// make top bar and footer sticky while the center scrolls.
display={'grid'}
gridTemplateRows={'auto 1fr auto'}
height={'100vh'}
>
<Topbar/>
<Box width={'100%'} overflowY={'auto'}>
Scrolling content here
</Box>
<FooterFromModifiedTopbar />
</Box> I'm wondering if there is a built in way to provider this sticky footer behavior with paste. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Sorry, I don't know how to help with that. The Paste documentation does not provide explicit information on how to modify the Topbar component to function as a sticky footer. Here are some similar discussions:
|
Beta Was this translation helpful? Give feedback.
-
We don't have a set way or component for creating a fixed footer to a page or form. Fortunately, Paste is very flexible, and you can achieve the same results in a lot of different ways. The way you've done it is perfectly fine. You could also set your footer to position sticky or absolute and attach it to the bottom of the window. At some point, we'll have to explore site and page footers in more depth to help keep our experiences feel more cohesive, we've just not gotten to it as no one was updating any of them. Hard to prioritize that way. |
Beta Was this translation helpful? Give feedback.
-
Following up here to say that I wouldn't recommend modifying our Topbar as a sticky footer, and instead to use Box directly. I say this for two main reasons:
Sticky footers usually depend on the rest of your website's frame elements being set up in a specific way to support it properly. Here's a great article, in which I recommend the flex or grid solution if possible: |
Beta Was this translation helpful? Give feedback.
Hi @cdignam-segment
We don't have a set way or component for creating a fixed footer to a page or form.
Fortunately, Paste is very flexible, and you can achieve the same results in a lot of different ways. The way you've done it is perfectly fine. You could also set your footer to position sticky or absolute and attach it to the bottom of the window.
At some point, we'll have to explore site and page footers in more depth to help keep our experiences feel more cohesive, we've just not gotten to it as no one was updating any of them. Hard to prioritize that way.