Skip to main content
.offset(offset: { x?: number; y?: number }): Component;

Parameters

offset
{ x?: number; y?: number }
The offset configuration.

Support

Usage

Horizontal offset

Text("Moved right")
    .offset({ x: 20 })

Vertical offset

Circle()
    .fill(Color("red"))
    .offset({ y: -10 })

Combined offset

Rectangle()
    .fill(Color("blue"))
    .offset({ x: 15, y: 25 })