JSFiddle - React, Tailwind, and code Playground

by gustav75

HTML

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Drum Sequencer</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tone/14.8.35/Tone.js"></script>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #1a1a1a;
            color: #fff;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
            margin: 0;
        }

        .sequencer {
            display: grid;
            grid-template-columns: repeat(16, 1fr);
            gap: 4px;
            margin: 20px 0;
        }

        .step {
            width: 40px;
            height: 40px;
            background-color: #333;
            border: 2px solid #444;
            cursor: pointer;
            box-sizing: border-box;
        }

        .step.active {
            background-color: #ff5722;
            border-color: #ff5722;
        }

        .track {
            margin-bottom: 10px;
        }

        .label {
            margin-right: 10px;
            color: #ccc;
            text-align: left;
        }

        .controls {
            display: flex;
            align-items: center;
            margin-top: 20px;
        }

        .tempo-control {
            display: flex;
            align-items: center;
            margin-left: 20px;
        }

        .tempo-control input {
            width: 50px;
            margin-left: 10px;
            padding: 5px;
            border-radius: 4px;
            border: none;
            text-align: center;
            background-color: #333;
            color: white;
        }

        button {
            padding: 10px 20px;
            background-color: #ff5722;
            border: none;
            color: white;
            cursor: pointer;
            border-radius: 4px;
           ...