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
    • Managing Style Properties
    • Managing Variable Modes
  • Components
  • Variables & Collections
    • Variable Collections
    • Variables
    • Variable Modes
  • Assets
  • Pages & Folders
  • Utilities
      • Get site information
      • Resize the extension
      • Close the extension
      • Get the current breakpoint
      • Get user ID token
      • Get user's Designer capabilities
      • Get the current Designer mode
      • Check for a Designer mode
      • Get the Designer's pseudo-state
      • Get launch context
      • Get app subscriptions
      • Get theme
      • Get theme styles
    • User Events & Notifications
    • App Intents & Connections
  • Additional Resources
    • API Playground
    • FAQs
LogoLogo
Resources
Get started
On this page
  • webflow.getPseudoMode()
  • Syntax
  • Returns
  • Example
  • Designer Ability
  • Pseudo-State Keys
UtilitiesSite Information & Settings

Get the pseudo state

Was this page helpful?
Previous

Get Launch Context

Next
Built with

webflow.getPseudoMode()

Get the current pseudo-class state (e.g. hover, focus, pressed) of the designer.

Syntax

1webflow.getPseudoMode(): Promise<null | PseudoStateKey>

Returns

A Promise that resolves to the current pseudo-class state of the designer, or null if no pseudo-state is active.

Promise<PseudoStateKey | null>

Example

1const pseudoState = await webflow.getPseudoMode();
2console.log(pseudoState);
3// Output: "hover"

Try this example

Designer Ability

Designer AbilityLocaleBranchWorkflowSitemode
canAccessCanvasAnyAnyAnyAny

Pseudo-State Keys

Pseudo-StateDesigner StateDescription
hoverHoverElement is hovered over by the mouse
pressedPressedElement is in pressed state
visitedVisitedLink element has been visited
focusFocusedElement has keyboard/input focus
focus-visibleFocused (Keyboard)Element has keyboard focus with visible indicator
focus-within—Element or its descendant has focus
placeholderPlaceholderPlaceholder text in form block inputs
first-childFirst ItemFirst Collection Item in a collection list
last-childLast ItemLast Collection Item in a collection list
nth-child(odd)Odd ItemsOdd-numbered Collection Item in a collection list
nth-child(even)Even ItemsEven-numbered Collection Item in a collection list