plotly / dash-component-boilerplate

Get started creating your own Dash components here.
275 stars 184 forks source link

nested splits #161

Closed luggie closed 9 months ago

luggie commented 9 months ago

I'm trying to set up a dashboard which is divided into three divs with "a" occupying the bottom half and "b" and "c" filling the top half, horizontally split. The layout works, the outer split however does not. Is there any way to make this work?

import dash
from dash_split import Split
from dash import html

app = dash.Dash(__name__)

style = {
    "height": "50vh",
    "display": "flex",
    "justifyContent": "center",
    "alignItems": "center"
}

app.layout = html.Div([
    Split(id='split-vertical', direction='vertical', children=[
        Split(
            id='split',
            children=[
                html.Div(id='2', children="b", style=style),
                html.Div(id='3', children="c", style=style),
            ],
    ),
        html.Div(id='1', children="a", style=style),
    ])
])

if __name__ == '__main__':
    app.run_server(debug=True)
luggie commented 9 months ago

Sorry, wrong repo. However I cannot remove it

alexcjohnson commented 9 months ago

I’ll close it. This kind of question is best suited to community.plot.ly anyway, rather than GitHub.