Closed tabuna closed 1 month ago
I think we might rename method like gridWidthColumns
or gridWidthColumns
or widthColumns
@agoalofalife I like your suggestion; I would prefer a shorter name, such as widthColumns
.
@tabuna Do this feature need in public documentation?
In the current version, the
Group
component is used to organize multiple fields in a single row divided into columns, and it supports two display modes:However, these modes can be limiting when building more customized interfaces, as they don't allow precise control over column widths (e.g., setting one field to take up 10% and another to take up 60% of the row).
To address this, I’ve added a new
widthColumns()
method, enabling CSS Grid support for columns. This method allows for flexible width configurations by passing values for thegrid-template-columns
CSS property. Example usage:The
widthColumns()
method accepts a range of values:30%
120px
2fr
max-content
andauto
These settings are applied only on desktop displays, while on mobile devices, each field will continue to display on a new row for better responsiveness.
This enhancement makes the
Group
component more versatile, allowing for customized column width distributions to create more tailored interfaces.Conflict or Inconsistency
We already have a similar mechanism in the
Split
layout, where it’s possible to define aratio
:I’m concerned that this new implementation may introduce inconsistency.