Skip to main content
type UnitPoint =
    | { x: number; y: number }
    | "zero"
    | "center"
    | "top"
    | "bottom"
    | "leading"
    | "trailing"
    | "topLeading"
    | "topTrailing"
    | "bottomLeading"
    | "bottomTrailing";
{ x, y }
object
A custom point with x and y values between 0 and 1. x: 0 is the leading edge, x: 1 is the trailing edge. y: 0 is the top, y: 1 is the bottom.
zero
string
The top-leading corner. Equivalent to { x: 0, y: 0 }.
center
string
The center point. Equivalent to { x: 0.5, y: 0.5 }.
top
string
Center of the top edge. Equivalent to { x: 0.5, y: 0 }.
bottom
string
Center of the bottom edge. Equivalent to { x: 0.5, y: 1 }.
leading
string
Center of the leading edge. Equivalent to { x: 0, y: 0.5 }.
trailing
string
Center of the trailing edge. Equivalent to { x: 1, y: 0.5 }.
topLeading
string
The top-leading corner. Equivalent to { x: 0, y: 0 }.
topTrailing
string
The top-trailing corner. Equivalent to { x: 1, y: 0 }.
bottomLeading
string
The bottom-leading corner. Equivalent to { x: 0, y: 1 }.
bottomTrailing
string
The bottom-trailing corner. Equivalent to { x: 1, y: 1 }.