Skip to content

[Text width] Define max-inline-size for text #7119

@kyrspl

Description

@kyrspl

Is your feature request related to a problem? Please describe.
Within our product, we have noticed inconsistencies in text width across various components. This not only affects the visual aesthetics but also impacts readability. It's crucial to address this issue to maintain a consistent appearance.

Potential solution
I propose to use options for max text width across EUI. We currently have this option in EuiText when grow is set to false. This will allow developers to set a consistent text width across different components, ensuring uniformity. The max text width can be applied as a default setting, with the flexibility for developers to override it if a specific component requires a different width.

Alternatives considered

  • Fixed Width for All Components: One approach could be to set a fixed text width for all components. However, this might be to constrictive as different components might have varying content and design requirements.
  • Responsive Text Width: Another option is to have a responsive text width based on the screen size or container width. This would adjust the text width dynamically but might introduce complexities in implementation.
  • Component-specific Settings: Instead of a global setting, we could allow developers to set text width at the component level. While this offers flexibility, it might lead to inconsistencies if not implemented with care.

Metadata

Metadata

Assignees

Labels

stale-issue(Don't delete - used for automation)stale-issue-closed(Don't delete - used for automation)

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions