Example 1: Size Slider
Code
let slider;
function setup() {
createCanvas(400, 400);
slider = createSlider(20, 220, 80, 1);
slider.position(16, 16);
slider.style('width', '180px');
}
function draw() {
background(250);
const s = slider.value();
fill(255, 48, 145);
noStroke();
circle(width / 2, height / 2, s);
fill(20);
text('Size: ' + s, 16, 54);
}Try this: Use slider input to control strokeWeight as well.