Get help from the marimo community

Updated 4 days ago

justify elements with vstack

Is there a way to let two elements align in a way that jusfies both left and right hand side of the composite component? Currently, I get something like this. But I would like to extend the elements sides so they match:
Attachment
image.png
H
M
j
3 comments
You mean like this:
Attachment
image.png
@john_helt , if you are looking for more of a grid-layout, you may need to roll this yourself instead of using the labels on the form:
Plain Text
mo.hstack(
  [
    mo.vstack([label1, label2]),
    mo.vstack([input1, input2])
  ],
  justify="start"
)
I feel like that doesn't really give the grid layout, because the text field is always the same width, but the labels may vary
Add a reply
Sign up and join the conversation on Discord