A Python layout library that uses Taffy, a Rust-powered implementation of CSS Grid and Flexbox, to compute layouts declaratively. Current version is 1.1.8, supporting Python >=3.8. Release cadence is irregular, approximately bi-monthly.
pip install stretchableNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Quickstart: create nodes, add children, compute layout, and access results.
Call root.add_child(child) before tree.compute_layout().
Refer to migration notes in GitHub releases. For custom measure functions, ensure they match the new signature (width, height, available_width, available_height).
Use dictionary format: size={'width': 100, 'height': 50}.Use node.style_setter() or modify individual properties of node.style (e.g., node.style.flex_direction = 'row').
No dependency data recorded yet.