Utility methods for determining the types of Penpot shapes.
const isBoard = typesUtils.isBoard(shape);console.log(isBoard); Copy
const isBoard = typesUtils.isBoard(shape);console.log(isBoard);
Checks if the given shape is a board.
The shape to check.
Returns true if the shape is a board, otherwise false.
Checks if the given shape is a group.
Returns true if the shape is a Group, otherwise false.
Checks if the given shape is a mask.
Returns true if the shape is a Group (acting as a mask), otherwise false.
Checks if the given shape is a boolean operation.
Returns true if the shape is a Bool, otherwise false.
Checks if the given shape is a rectangle.
Returns true if the shape is a Rectangle, otherwise false.
Checks if the given shape is a path.
Returns true if the shape is a Path, otherwise false.
Checks if the given shape is a text element.
Returns true if the shape is a Text, otherwise false.
Checks if the given shape is an ellipse.
Returns true if the shape is an Ellipse, otherwise false.
Checks if the given shape is an SVG.
Returns true if the shape is a SvgRaw, otherwise false.
Utility methods for determining the types of Penpot shapes.
Example