Skip to content

API Index

Use this page to locate a public v2 symbol. Import components, composables, and component contracts from grid-layout-plus. Import DOM-free algorithms from grid-layout-plus/core when you do not need the components or their injected CSS.

Choose an API by task

TaskStart withRead next
Render an interactive Vue gridGridLayout and GridItemUsage
Add a visual grid behind itemsGridBackgroundGrid Background example
Change a rendered grid from codeGridLayoutExposeOperation contracts
Build a custom rendereruseGridLayoutComposable example
Manage responsive state without componentsuseResponsiveLayoutResponsive types
Observe the container widthuseContainerWidthWidth property
Validate or normalize Layout datavalidateLayout or normalizeLayoutCore API
Handle a rejected operationOperationRejectedPayloadRejection reasons
Migrate v1 codeMigration from v1Properties

Components and component contracts

Public exportReference
GridLayoutGridLayout properties, events, and methods
GridItemGridItem properties and events
GridBackgroundGridBackground properties
GridLayoutProps, GridItemPropsProperties
GridLayoutEmits, GridItemEmitsEvents
GridLayoutExpose, LayoutTransactionReceiptMethods and transaction receipts
GridLayoutSlots, GridLayoutSlotScopeSlots
GridConfig, DragConfig, ResizeConfigGrouped configuration
DropConfig, DropCandidate, DropDragOverInput, DropDragOverContext, DropEvaluationResultDrop types and drop events
LayoutUpdateMeta, ResponsiveWidthState, WidthChangedPayloadEvents
InteractionStartPayload, InteractionChangePayloadInteraction events

Layout and extension types

Public exportReference
LayoutItemRequired, LayoutItem, ReadonlyLayoutItem, Layout, ReadonlyLayoutLayout types
DefaultBreakpoint, BreakpointsBreakpoint types
ResponsiveValue, ResponsiveLayoutsInput, CompleteResponsiveLayoutsResponsive layout types
Breakpoint, ResponsiveLayoutDeprecated compatibility aliases
CollisionModeCollision mode
Compactor, CompactType, CompactMinPositionsCompactor contract
PositionStrategy, PositionStylePosition strategy contract
GridCellDimensions, CalcGridCellDimensionsInput, GridGeometry, PixelRect, ReadonlyClientRectGeometry types
LayoutOperationResult, LayoutOperationResultBase, AcceptedLayoutOperationResult, RejectedLayoutOperationResult, LayoutOperationReasonOperation results
NormalizeLayoutOptions, DeepReadonlyCore API and Layout types
GridLayoutValidationCode, GridLayoutExtensionCode, GridLayoutExtensionSourceErrors

Composables and headless contracts

Public exportReference
useGridLayout, UseGridLayoutOptions, UseGridLayoutReturnuseGridLayout
useResponsiveLayout, UseResponsiveLayoutOptions, UseResponsiveLayoutReturnuseResponsiveLayout
useContainerWidth, UseContainerWidthOptions, UseContainerWidthReturnuseContainerWidth
GridDragState, GridResizeState, GridInteractionCandidateuseGridLayout returned state
GridInteractionStart, GridInteractionStartResult, GridInteractionTokenuseGridLayout interactions
InteractionCommandResult, InteractionCancelReasonInteraction terminal contract
InteractionTerminalBase, InteractionTerminalPayloadInteraction terminal contract
LayoutChangeReason, OperationRejectedReason, OperationRejectedPayloadOperation contracts
GridLayoutRuntimeErrorRuntime errors

Core values

All values in this section are available from both grid-layout-plus and grid-layout-plus/core. Prefer the /core entry for algorithm-only code.

Public exportReference
validateLayout, normalizeLayout, cloneLayoutValidate and normalize
bottom, collides, getFirstCollision, getAllCollisions, sortLayoutItemsByRowColQuery a Layout
correctBounds, compactBounds and legacy primitives
verticalCompactor, horizontalCompactor, noCompactorCompactors
fastVerticalCompactor, fastHorizontalCompactorCompactors
transformStrategy, absoluteStrategy, scaledStrategyPosition strategies
calcGridCellDimensions, gridToPixelRect, pointerToGridPosition, pixelSizeToGridSizeGeometry conversion
GridLayoutValidationError, GridLayoutExtensionErrorErrors
moveElement, withOverlapDeprecated APIs

Import boundaries

ts
import { GridLayout, useGridLayout } from 'grid-layout-plus'
import { normalizeLayout, validateLayout } from 'grid-layout-plus/core'

The root entry injects component CSS. The /core entry has no Vue, DOM, or component CSS dependency. Public APIs not listed here should not be imported from src, es, lib, or another internal path.

Released under the MIT License.