Taffy Layout API Documentation
Enumerations
| Enumeration | Description |
|---|---|
| AlignContent | Multi-line content alignment enumeration |
| AlignItems | Cross-axis alignment enumeration for all children |
| AlignSelf | Cross-axis alignment enumeration for a single element |
| BoxSizing | Box sizing enumeration |
| Display | Display mode enumeration |
| FlexDirection | Flex direction enumeration |
| FlexWrap | Flex wrap mode enumeration |
| GridAutoFlow | Grid auto flow enumeration |
| JustifyContent | Main axis alignment enumeration |
| Overflow | Overflow handling enumeration |
| Position | Position mode enumeration |
| TextAlign | Text alignment enumeration (for block layout) |
Classes
| Class | Description |
|---|---|
| Layout | Computed layout result containing position, size, and spacing values for a node. |
| Style | CSS layout configuration for a node, including flexbox, sizing, spacing, and alignment properties. |
| TaffyError | Error class thrown when a Taffy operation fails, containing a human-readable error message. |
| TaffyTree | The main layout tree class for creating nodes, computing layouts, and managing a tree of styled elements. |
Interfaces
| Interface | Description |
|---|---|
| InitOutput | - |
Type Aliases
| Type Alias | Description |
|---|---|
| AvailableSpace | Available space constraint for layout computation. |
| DetailedGridInfo | Detailed information about a grid layout. |
| DetailedGridItemsInfo | Information about a grid item's placement. |
| DetailedGridTracksInfo | Information about grid tracks (rows or columns). |
| DetailedLayoutInfo | Detailed layout information (for grid layouts). |
| Dimension | Dimension type supporting length, percentage, or auto values. |
| GridPlacement | Grid placement type for positioning grid items. |
| GridTemplateArea | Named grid area definition. |
| GridTemplateComponent | Grid track sizing definition. |
| GridTemplateRepetition | Grid track repetition definition. |
| InitInput | - |
| LayoutProperty | Valid property keys for Layout.get() method. |
| LayoutPropertyArrayValues | Helper type to convert an array of layout property keys to an array of their value types. |
| LayoutPropertyValues | Type-safe property values for Layout.get(). |
| LengthPercentage | Length or percentage value (no auto support). |
| LengthPercentageAuto | Length, percentage, or auto value. |
| Line | Line type representing start and end positions. |
| MaxTrackSizingFunction | Maximum track sizing function. |
| MeasureFunction | Custom measure function for leaf nodes with text or other dynamic content. |
| MinTrackSizingFunction | Minumum track sizing function. |
| Point | Point with x and y coordinates/values. |
| Rect | Rectangle with left, right, top, and bottom values. |
| RepetitionCount | Grid track repetition parameter. |
| Size | Generic size type with width and height. |
| StyleProperty | Valid property keys for Style.get() method. |
| StylePropertyArrayValues | Helper type to convert an array of property keys to an array of their value types. Unlike TupleToStyleValues, this returns an array type instead of a tuple. |
| StylePropertyValues | Type-safe property values for batch setting. |
| SyncInitInput | - |
| TrackSizingFunction | Track sizing function (min/max pair). |