Rectangle
By default, a Rectangle
is just an empty item that shows nothing. By setting a color or configuring a border,
it’s then possible to draw a rectangle on the screen.
When not part of a layout, its width and height default to 100% of the parent element.
Properties
background
border-color
border-width
clip
bool default: false
By default, when child elements are outside the bounds of a parent,
they are still shown. When this property is set to true
, the children
of this Rectangle
are clipped and only the contents inside the elements bounds are shown.
Border Radius Properties
border-radius
length default: 0
The size of the radius. This single value is applied to all four corners.
To target specific corners with different values use the following properties:
border-top-left-radius
length default: 0px
border-top-right-radius
length default: 0px
border-bottom-left-radius
length default: 0px
border-bottom-right-radius
Drop Shadows
To achieve the graphical effect of a visually elevated shape that shows a shadow effect underneath the frame of
an element, it’s possible to set the following drop-shadow
properties:
drop-shadow-blur
length default: 0px
The radius of the shadow that also describes the level of blur applied to the shadow. Negative values are ignored and zero means no blur.
drop-shadow-color
color default: a transparent color
The base color of the shadow to use. Typically that color is the starting color of a gradient that fades into transparency.
drop-shadow-offset-x
length default: 0px
The horizontal distance of the shadow from the element’s frame.
drop-shadow-offset-y
length default: 0px
The vertical distance of the shadow from the element’s frame.
© 2024 SixtyFPS GmbH