Position

Position mode enumeration

Controls how an element is positioned within its parent container. This corresponds to the CSS position property.

Example

import { Style, Position } from "taffy-layout"; const style = new Style(); style.position = Position.Relative; // Normal document flow style.position = Position.Absolute; // Removed from flow, uses inset values

Enumeration Members

Enumeration MemberValueDescription
Absolute1Element is positioned relative to its nearest positioned ancestor
Relative0Element participates in normal document flow

© 2026 ByteLand Technology Limited