Get style by name or path
webflow.getStyleByName(nameOrPath)
Retrieve a Style by its name or path.
Syntax
Parameters
nameOrPath: string | Array<string> - The name of the style to retrieve or the path to the style to retrieve, consisting of the name of the parent and the name of the style.
Returns
Promise<Style | null>
A Promise that resolves to a style object, or null if the named style doesn’t exist.
Examples
Getting a style by name:
Getting a style by path:
Designer Ability
Checks for authorization only