useGrid()

useGrid(): Object

Returns an object describing the composition's base design grid. Learn more about grid units in the Layout API docs.

Return type

PropertyTypeDescription
pixelsPerGridUnitNumberThis is the scale factor that lets you translate grid units to output pixels

Sample code

Additional examples of usage for this custom hook can be found in the source code for the VCS SDK.