Skip to main content
The ClipRRect widget in Stac allows you to clip its child using rounded rectangles. This is useful when you want to create UI elements with rounded corners.

Usage

Properties

BorderRadius Format Options

The borderRadius property can be specified in multiple formats:

Single Value (applies to all corners)

List Format (topLeft, topRight, bottomLeft, bottomRight)

Object Format (specify each corner individually)

Clip Behavior Options

The clipBehavior property accepts the following values:
  • "antiAlias" (default): Clip using anti-aliasing for smoother edges
  • "hardEdge": Clip without anti-aliasing for sharper edges
  • "antiAliasWithSaveLayer": Anti-aliased clipping with an offscreen buffer (higher quality but slower)
  • "none": No clipping (not recommended for ClipRRect)

Examples

Basic Rounded Container

Rounded Image

Card with Different Corner Radii

  • Container - Often used as a child of ClipRRect
  • Card - A pre-styled container with elevation and rounded corners