Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Space

A flexible spacer.

with sc.Row():
    sc.IconButton('home')
    sc.Space(size='stretch')
    sc.Popover(':material/bucket_check: 0')
ArgumentTypeMeaning
sizesize keywordAlias of width
widthsize keywordThe spacer’s width

Properties: visible.

Inside a Row, a stretching Space absorbs the leftover width, pushing everything after it to the right edge. In a vertical container there is no leftover width to absorb, so it renders nothing.

size is the spelling used by st.space. Space(size='stretch') and Space(width='stretch') are the same spacer, and passing both raises an error.