Rettangoli UI Docs Introduction Getting Started CSS Variables Colors rtgl-view Dimensions Direction Align Background Color Gap Flex Border Margin Padding Position Scroll rtgl-text Size Alignment Color Ellipsis rtgl-image Dimensions Border Object Fit rtgl-svg Dimensions Color rtgl-button Type Dimensions Links Margins Introduction
The layout is basically made out of rectangles
Rettangoli means rectangles in Italian. Rettangoli is a layout and UI library with a small yet practical API designed for building modern web applications efficiently. Core Philosophy The essence of Rettangoli is to expose a minimal set of APIs that cover the most common UI development needs. This approach offers several key benefits:
  • Quick to learn and intuitive to use: We set sensible defaults whenever possible, reducing the learning curve
  • Stable API: The small, focused API surface is easier to maintain and keep stable over time
  • Robust implementation: A smaller API allows for more comprehensive testing and reliability
  • Portable across environments: The API is compact enough that it can be easily reimplemented in different environments and platforms
Motivation CSS has evolved over many decades. Being a protocol, it must maintain backward compatibility, resulting in an extensive API. While this is appropriate for a general purpose language, the vast API makes it unnecessarily complex for typical application development. After building UI applications for over a decade, I've developed an understanding of which features are commonly used and which are rarely needed in day to day development. Rettangoli embodies the "less is more" principle: our goal is to provide just 5% of the API surface that covers 95% of real-world use cases. This focused approach leads to:
  • Faster development: Less time spent learning API details means more time building features
  • More consistent UIs: A constrained API naturally guides developers toward consistent patterns
  • Better performance: A streamlined library with fewer features can be optimized more effectively
Who Should Use Rettangoli Rettangoli is ideal for:
  • Frontend developers looking for a lightweight alternative to complex UI frameworks
  • Teams that value consistency and simplicity in their UI development
  • Applications that want to minimize external dependencies