@bind
Making your notebook interactive is very easy with Pluto! This article will teach you how to use @bind to add interactive UI like sliders, buttons, scrubbables, text fields, and more.
The easiest way to get started is with PlutoUI. Add the following code in your notebook:
using PlutoUI
@bind apples Slider(5:50)
apples
repeat("๐", apples)
This is what you get:
The core idea with @bind is that you can control a global variable with a UI element. Because Pluto has reactive global variables, it is up to your creativity what you do with it! Anything that depends (indirectly) on the bound variable will automatically update when you change the UI element.
To see the complete list of UI that PlutoUI provides, including buttons, file upload and layout, check out the PlutoUI documentation! ๐
Sliders, buttons, dropdowns, and more using PlutoUI.jl!