We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8d21b6c commit cfc8231Copy full SHA for cfc8231
src/examples/utilities.ts
@@ -205,6 +205,17 @@ export const Utilities = {
205
)
206
},
207
208
+ subscribeSelectedVariant: async () => {
209
+ // Subscribe to variant selection changes on the component canvas
210
+ const unsubscribe = webflow.subscribe('selectedvariant', (variant) => {
211
+ console.log('Selected variant:', variant.name)
212
+ console.log('Variant ID:', variant.id)
213
+ })
214
+
215
+ // Stop listening after 10 seconds
216
+ setTimeout(unsubscribe, 10000)
217
+ },
218
219
getLaunchContext: async () => {
220
const context = await webflow.getLaunchContext()
221
console.log('Launch Context:', context)
0 commit comments