Display

Display mode enumeration

Controls the layout algorithm type for an element. This corresponds to the CSS display property and determines how an element and its children are laid out.

Example

import { Style, Display } from "taffy-layout"; const style = new Style(); style.display = Display.Flex; // Enable flexbox layout style.display = Display.Grid; // Enable grid layout style.display = Display.None; // Hide element from layout

Enumeration Members

Enumeration MemberValueDescription
Block0Block layout for the element's children, including flow, margins, and floats
Flex1Flexbox layout for one-dimensional item arrangement
FlowRoot4Block layout that always establishes a new block formatting context
Grid2CSS Grid layout for two-dimensional item arrangement
None3Element is removed from layout calculation entirely

© 2026 ByteLand Technology Limited