JSFiddle - React, Tailwind, and code Playground

by velo_ninja

HTML

<div class="container">
    <style>
        .container {
            background: #1a1a1a;
            color: #fff;
            padding: 2rem;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
        }
        .player-container {
            background: #2a2a2a;
            border-radius: 12px;
            padding: 2rem;
            margin-bottom: 2rem;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .waveform-container {
            margin: 1.5rem 0;
            position: relative;
            border-radius: 8px;
            overflow: hidden;
            background: #333;
        }
        .controls {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-top: 1rem;
        }
        .play-btn {
            background: #4CAF50;
            border: none;
            color: white;
            width: 48px;
            height: 48px;
            border-radius: 50%;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background-color 0.3s;
        }
        .play-btn:hover {
            background: #45a049;
        }
        .toggle-container {
            display: flex;
            gap: 1rem;
            margin-bottom: 2rem;
        }
        .toggle-btn {
            flex: 1;
            padding: 1rem;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 600;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
        }
        .toggle-btn.before {
            background: #2196F3;
            color: white;
        }
        .toggle-btn.after {
            background: #9C27B0;
            color: white;
        }
        .toggle-btn.inactive {
            background:...