Skip to content

Add proper border support for UI nodes #5924

@TimJentzsch

Description

@TimJentzsch

What problem does this solve or what need does it fill?

Adding borders to UI elements is a common need, both for design and debugging.
Currently, we can only set the width of the border, but not the color. So it doesn't have a real visual effect at the moment.

What solution would you like?

Ideally, we should be able to define the following properties:

  • Border color
  • Border width (this is already possible)
  • Border radius (i.e. round corners; both pixel and percent values should be possible here)

We could also think about supporting more complex styles, like dashed borders.

Once #5513 is merged, it probably makes sense to have all of these together in a style component.

Additionally, we could think about supporting outlines as well. These are essentially additional borders around the normal borders and can be used for accessibility features like visualizing keyboard focus.

What alternative(s) have you considered?

Currently it's sort of possible to make "borders" by wrapping the node in another node that is slightly larger and has a background color.

This approach is very limited and not ergonomic at all.

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-RenderingDrawing game state to the screenA-UIGraphical user interfaces, styles, layouts, and widgetsC-FeatureA new feature, making something new possibleS-BlockedThis cannot move forward until something else changes

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions