For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Resources
Get started
ReferenceGuidesExamplesChangelog
ReferenceGuidesExamplesChangelog
  • Designer API
    • Introduction
    • Getting Started
    • Webflow CLI
    • Error Handling
    • App Modes
  • Elements
    • Creating & Retrieving Elements
    • Element Properties & Methods
    • Element Types & Methods
  • Styles
      • Get all styles
      • Get style by name or path
      • Create style
      • Set style name
      • Remove style
      • Is combo class
      • Get style type
      • Is from library
      • Get parent style
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • style.isFromLibrary()
StylesCreating & Retrieving Styles

Check if a style is from a library

Was this page helpful?
Previous

Get parent style

Get the parent style of a combo class style.
Next
Built with

style.isFromLibrary()

Check if a style originated from a library, such as a Shared Library or AI Site Generation. This method is synchronous, so it doesn’t require await.

Syntax

1style.isFromLibrary(): boolean

Returns

boolean

Returns true if the style originated from a library (Shared Library or AI Site Generation), and false otherwise.

Example

1// Get all styles and filter to site-only global classes
2const styles = await webflow.getAllStyles();
3const siteOnlyClasses = styles.filter(
4 (style) => style.getType() === "global" && !style.isFromLibrary()
5);

Try this example

Designer ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny