The Advanced Spin Wheel plugin helps you add a fully customizable, server-side spin wheel to your Bubble app to increase user engagement through gamification.
It is designed for secure winner selection, weighted probabilities, and flexible customization, making it suitable for real production use.
β¨ Key Features
Server-side winner selection (non-manipulable)
Weighted probabilities for each slice
Fully customizable design and animation
Easy workflow integration
Supports promotions, giveaways, and gamification flows
Optional hidden weights for equal visual slices
π Installation
Open your Bubble app editor.
Go to the Plugins tab.
Click Add plugins.
Search for Advanced Spin Wheel.
Click Subscribe.
The plugin will be available immediately after subscription.
π§± Adding the Spin Wheel to the Page
Go to the Design tab.
Drag the Advanced Spin Wheel element onto your page.
Place it anywhere you want.
Customize its appearance using the elementβs properties:
Colors
Text styles
Animation speed
Slice size
π Data Structure (Recommended)
To manage labels and probabilities dynamically, we recommend creating a data type.
Wheel Item (Data Type)
Field Name
Type
Description
Label
Text
Text displayed on the wheel
Weight
Number
Probability weight for the slice
π Creating Wheel Items
Go to Data β App Data.
Create items under Wheel Item.
Example:
Label
Weight
50% OFF
5
25% OFF
10
Free Shipping
20
Try Again
40
Higher weight = higher chance to win.
π¨ Configuring Labels & Weights
Go back to the Design tab.
Select the Advanced Spin Wheel element.
Set Option Labels using the Label field.
Use Copy Expression to bind the Weight field.
Adjust width and height if needed.
βΆοΈ Creating the Spin Flow
Add a button to trigger the spin.
Required Workflow Order
The spin must follow this exact sequence:
1οΈβ£ Start Spin
Action:start_spin
Starts the wheel animation.
2οΈβ£ Get Winner Index (Server-Side)
Action:get_winner_index
Runs entirely on the server
Securely selects the winner using weights
Returns:
winner_index
winner_label
3οΈβ£ Stop Spin
Action:stop_spin
Stops the animation
Set Winner Index to:
This ensures the wheel stops on the correct slice.
πͺ Showing the Result to the User
Create a Popup in the Design tab.
Add a text element inside the popup.
Set the popupβs Type of content to Text.
Bind the text dynamically.
Workflow Action
Add a workflow action:
Action:Display data in popup textData to display:
π Spin Finished Event
Use the plugin event:
Advanced Spin Wheel β Cycle Finished
Connect it to:
Show Popup
This ensures the popup opens automatically when the spin ends.
πΎ Saving the Result to the Database
Winner Prize (Data Type)
Field Name
Type
Winner
User
Item
Wheel Item
Workflow Action
Add a workflow step:
Action:Create a new thingType:Winner Prize
Winner: Current User
Item:
π Preview & Test
Preview the app.
Click Spin.
Verify:
The wheel spins
A prize is selected
Popup shows the result
Data is saved under Winner Prize
βοΈ Hiding Weights (Optional)
You can enable Hide Option Weights in the plugin element.
All slices will appear equal in size
Weighted probability logic still applies internally
This is useful for fairness perception.
π¨ Customization Options
The plugin provides extensive customization options, including:
Slice colors
Fonts and text styles
Animation speed
Visibility controls
Explore the plugin element settings for full control.
π Support
If you have questions, need help, or want to adapt this flow to your product: