JSFiddle - React, Tailwind, and code Playground

JavaScript

$('body').append($('<div>')
    .append($('<label>')
           .text('Test 1')
           .attr('for','test1'))
    .append($('<input>')
           .attr('type','checkbox')
           .attr('id','test1'))
    .append($('<label>')
           .text('Test 2')
           .attr('for','test2'))
    .append($('<input>')
           .attr('type','checkbox')
           .attr('id','test2'))
    .buttonset())