JSFiddle - React, Tailwind, and code Playground

HTML

<div class="word">
    <div></div>
    <div>p</div>
    <div>i</div>
    <div>r</div>
    <div>o</div>
    <div>m</div>
    <div>l</div>
    <div>l</div>
    <div>w</div>
    <div>y</div>
    <div>u</div>
    <div>o</div>
    <div>g</div>
    <div>t</div>
    <div>o</div>
    <div>o</div>
    <div>i</div>
    <div>t</div>
    <div>h</div>
    <div>e</div>
    <div>m</div>
</div>

CSS

.word {
    margin: 10px;
    width: 100%;
    height: 20px;
}
.word > div {
    font-family:'Trebuchet MS';
    width: 20px;
    height: 20px;
    line-height: 18px;
    background-color: #CDE;
    float: left;
    margin: 2px;
    text-align: center;
    cursor: pointer;
    border-radius: 2px;
}
.word > div:active {
    background-color: #DCC;
    width: 24px;
    height: 24px;
    margin: 0px;
    font-size: 16px;
}

JavaScript

$(function () {
    $(".word").sortable();
});