Slint Layouts 2.0
Cross-platform declarative graphical user interfaces
Slint is a Rust-based cross-platform UI toolkit, building on the same concept of declarative UI but doing so in a type-safe manner. This proposal focuses on redeveloping the layout engine to improve the creation of scalable user interfaces, able to support modern features and anchor positioning. This project modernises Slint’s layout system to better support today’s diverse screen sizes, mobile devices, and maker-driven use cases. It adds a more powerful hierarchical layout system with cross-axis alignment, text baseline alignment, correct application of size constraints in conditional and repeated elements, and extended GridLayout capabilities (axis-specific spacing, dynamic spacing, automatic wrapping. Its new flexible layout abstractions will allow layouts to be defined dynamically (e.g. horizontal vs. vertical based on orientation) and support wrapping behavior similar to Flex/Wrap layouts. It is based on an anchor positioning system with clear syntax, enabling developers to express visual relationships between elements without deep layout hierarchies or complex equations. The project will also improve layout tooling: e.g. add runtime warnings for unsatisfiable constraints, compiler-reported source locations, and live preview visualizations of the layout tree and constraint issues.
- The project's own website: https://github.com/slint-ui/slint
Run by SixtyFPS GmbH
This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429. Additional funding is made available by the Swiss State Secretariat for Education, Research and Innovation (SERI).