Skip to content

Sidebar open state? #373

Answered by maartenbreddels
Enochsoul asked this question in Q&A
Discussion options

You must be logged in to vote

Hi,

good question.
Similar to https://solara.dev/docs/howto/layout you can define you own layout, but now override the sidebar_open default argument:

@solara.component
def Layout(children=[]):
    print("I get called before the Page component gets rendered")
    return solara.AppLayout(children=children, sidebar_open=False)

What you do, is add an new AppLayout in an already existing applayout, which by default will use the 'embedded' mode similar to what you see on https://solara.dev/docs/howto/layout . This is because you can't really have two sidebars on one page.

Does this make sense? Did you managed to find this page in the documentation, and if so, what should we change according to…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Enochsoul
Comment options

Answer selected by Enochsoul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants