Sidebar implementation in Next Js and Changing styles #3561
-
I am implementing the sidebar in next-Js by including it on every page. Since next-Js has inbuilt routing sidebar is getting rendered on every page .Is there any other way to implement it so that it just gets rendered once . Or is it fine ?? One more Question is that is there any way or some kind of prop for changing the styling of side bar and designing it as per our own colors ?? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
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, the Paste documentation does not provide specific guidance on implementing the sidebar in a Next.js application or how to prevent the <SidebarNavigationItem href="/valid-url">Navigation Item</SidebarNavigationItem> For your specific use case, you might want to consider using Next.js's Here are some similar discussions:
|
Beta Was this translation helpful? Give feedback.
-
Hi @ehsaan-changa We use page layouts on our docsite for the Sidebar to be used on every page. Not sure if that answers your question. I'm assuming you found an answer to an original question about the Sidebar Nav links, and hooking into the Next router. For reference, we wrap it in the Next Link component and pass down the href https://github.com/twilio-labs/paste/blob/main/packages/paste-website/src/components/site-wrapper/sidebar/SidebarAnchor.tsx As for Customizations and themeing, as long as you're not building a Twilio application internally, this series of customization docs will hopefully explain how to theme and customize Paste applications https://paste.twilio.design/customization Thanks |
Beta Was this translation helpful? Give feedback.
Hi
It's potentailly a little buried, but as outlined in the Elements API docs, you are able to nest any CSS selector under an element name. That includes attribute selectors for targeting ARIA attributes that are used for accessibility.
THe selected item has the
aria-current="page"
attribute added, so you could add an attribute selector likeetc