diff --git a/src/dom/dom.js b/src/dom/dom.js index d35a53bc74..cd6ff07bed 100644 --- a/src/dom/dom.js +++ b/src/dom/dom.js @@ -1463,6 +1463,18 @@ p5.prototype.createSelect = function(...args) { * @example *
* + * let style = document.createElement('style'); + * style.innerHTML = ` + * .p5-radio label { + * display: flex; + * align-items: center; + * } + * .p5-radio input { + * margin-right: 5px; + * } + * `; + * document.head.appendChild(style); + * * let myRadio; * * function setup() { @@ -1472,6 +1484,7 @@ p5.prototype.createSelect = function(...args) { * // in the top-left corner. * myRadio = createRadio(); * myRadio.position(0, 0); + * myRadio.class('p5-radio'); * myRadio.size(60); * * // Add a few color options. @@ -1538,6 +1551,7 @@ p5.prototype.createSelect = function(...args) { * // in the top-left corner. * myRadio = createRadio(); * myRadio.position(0, 0); + * myRadio.class('p5-radio'); * myRadio.size(50); * * // Add a few color options.