Expand description
Contains useful types and functions for layout interaction.
Structs§
- Dimension
- A unit of linear measurement
- Layout
- The final result of a layout algorithm for a single node.
- Layout
Node - The computed layout with children nodes.
- Layout
Style - Defines different aspects and properties of a widget layout.
- Length
Percentage - A unit of linear measurement
- Length
Percentage Auto - A unit of linear measurement
- Line
- An abstract “line”. Represents any type that has a start and an end
- NodeId
- A type representing the id of a single node in a tree of nodes
- Rect
- An axis-aligned UI rectangle
- Style
Node - The raw layout styles with children nodes.
- Taffy
Tree - An entire tree of UI nodes. The entry point to Taffy’s high-level API.
Enums§
- Align
Content - Sets the distribution of space between and around content items For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- Align
Items - Used to control how child nodes are aligned. For Flexbox it controls alignment in the cross axis For Grid it controls alignment in the block axis
- Display
- Sets the layout used for the children of this node
- Flex
Direction - The direction of the flexbox layout main axis.
- Flex
Wrap - Controls whether flex items are forced onto one line or can wrap onto multiple lines.
- Grid
Auto Flow - Controls whether grid items are placed row-wise or column-wise. And whether the sparse or dense packing algorithm is used.
- Overflow
- How children overflowing their container should affect layout
- Position
- The positioning strategy for this item.
- Taffy
Error - An error that occurs while trying to access or modify a node’s children by index.
Type Aliases§
- Align
Self - Controls alignment of an individual node
- Grid
Placement - A grid line placement specification. Used for grid-[row/column]-[start/end]. Named tracks are not implemented.
- Justify
Content - Sets the distribution of space between and around content items For Flexbox it controls alignment in the main axis For Grid it controls alignment in the inline axis
- Justify
Items - Used to control how child nodes are aligned. Does not apply to Flexbox, and will be ignored if specified on a flex container For Grid it controls alignment in the inline axis
- Justify
Self - Controls alignment of an individual node
- Taffy
Result - The error Taffy generates on invalid operations