このページの翻訳はまだありません。英語版を表示しています。

Taffy Layout API Documentation

Enumerations

EnumerationDescription
AlignContentMulti-line content alignment enumeration
AlignItemsCross-axis alignment enumeration for all children
AlignSelfCross-axis alignment enumeration for a single element
BoxSizingBox sizing enumeration
DisplayDisplay mode enumeration
FlexDirectionFlex direction enumeration
FlexWrapFlex wrap mode enumeration
GridAutoFlowGrid auto flow enumeration
JustifyContentMain axis alignment enumeration
OverflowOverflow handling enumeration
PositionPosition mode enumeration
TextAlignText alignment enumeration (for block layout)

Classes

ClassDescription
LayoutComputed layout result containing position, size, and spacing values for a node.
StyleCSS layout configuration for a node, including flexbox, sizing, spacing, and alignment properties.
TaffyErrorError class thrown when a Taffy operation fails, containing a human-readable error message.
TaffyTreeThe main layout tree class for creating nodes, computing layouts, and managing a tree of styled elements.

Interfaces

InterfaceDescription
InitOutput-

Type Aliases

Type AliasDescription
AvailableSpaceAvailable space constraint for layout computation.
DetailedGridInfoDetailed information about a grid layout.
DetailedGridItemsInfoInformation about a grid item's placement.
DetailedGridTracksInfoInformation about grid tracks (rows or columns).
DetailedLayoutInfoDetailed layout information (for grid layouts).
DimensionDimension type supporting length, percentage, or auto values.
GridPlacementGrid placement type for positioning grid items.
GridTemplateAreaNamed grid area definition.
GridTemplateComponentGrid track sizing definition.
GridTemplateRepetitionGrid track repetition definition.
InitInput-
LayoutPropertyValid property keys for Layout.get() method.
LayoutPropertyArrayValuesHelper type to convert an array of layout property keys to an array of their value types.
LayoutPropertyValuesType-safe property values for Layout.get().
LengthPercentageLength or percentage value (no auto support).
LengthPercentageAutoLength, percentage, or auto value.
LineLine type representing start and end positions.
MaxTrackSizingFunctionMaximum track sizing function.
MeasureFunctionCustom measure function for leaf nodes with text or other dynamic content.
MinTrackSizingFunctionMinumum track sizing function.
PointPoint with x and y coordinates/values.
RectRectangle with left, right, top, and bottom values.
RepetitionCountGrid track repetition parameter.
SizeGeneric size type with width and height.
StylePropertyValid property keys for Style.get() method.
StylePropertyArrayValuesHelper 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.
StylePropertyValuesType-safe property values for batch setting.
SyncInitInput-
TrackSizingFunctionTrack sizing function (min/max pair).

Functions

FunctionDescription
defaultIf module_or_path is {RequestInfo} or {URL}, makes a request and for everything else, calls WebAssembly.instantiate directly.
initSyncInstantiates the given module, which can either be bytes or a precompiled WebAssembly.Module.

© 2026 ByteLand Technology Limited