Help guide

DOM Query Size node

Updated June 21, 2026

DOM Query Size node

Product media placeholder

Replace this area with a screenshot or short walkthrough video during the media sweep.

Counts DOM elements matching a CSS selector at bind time. Pairs with forEach-driven cluster math: feed `count` into a singleton expression that needs to know N (e.g. dock cluster bounds) so the graph-side N stays in lockstep with the DOM-side icon count — author no longer has to keep a hardcoded `N` in sync with the HTML.

Type domQuerySizeCategory inputsContext sharedDynamic ports noCompound no

Inputs

PortTypeDescription
--No ports declared.

Outputs

PortTypeDescription
countfloatNumber of DOM elements matching `selector` at bind time. Use the same selector your sibling forEach uses.

Parameters

ParameterTypeDefaultDescription
selectorelementSelector""CSS selector matching the DOM elements you want to count. Use the same selector as the sibling forEach instance — e.g. `.toolbar .toolbarItem` for dock-style cluster math.

Envelope

Use domQuerySize as the node type inside a graph node envelope. Add id, optional params, optional connections, and optional activeWhen based on the guide context.

Generated source

Registry faster-motion-docs/node-registry.jsonCategory page /help/faster-motion/faster-motion-node-category-inputs/

Was this guide helpful?

Sunny Arora

Written by

Sunny Arora

Get technical deep dives delivered to your inbox

Join creators and developers who get exclusive insights, tutorials, and behind-the-scenes content every week.

No spam. Unsubscribe anytime.

Continue Exploring

You might also enjoy