Can we add width to spacers?

When I use spacers I noted that it has only height property and no width property . So please add width property also to it …

Width is generally more a property of the container in Anvil. The reason is to make apps automatically responsive to the browser window size (especially so the layout adapts to desktop vs. mobile screens).

Here’s an example app with a spacer in between two full-align buttons:
https://anvil.works/build#clone:TAECHKD7MILFKBBM=6TYTVUTIYJMVQTZNQQ6BETIJ

Notice how width works differently depending on whether the most immediate container is a Column Panel or a Flow Panel. Try running the app and seeing how the layout changes when you change the width of the browser.

2 Likes