getActiveCollection

getActiveCollection

getActiveCollection

Retrieve the Collection currently active (selected) in the Framer UI.

const collection = await framer.getActiveCollection();

Returns

  • Promise<Collection | null> – The active Collection or null if none is selected.

Caveats

  • If the active Collection is managed by a Plugin, you may want to use getActiveManagedCollection() instead.

  • The selection may change if the user interacts with the UI.