پیش‌نمایش زنده
کد HTML
<label for="tool_button" class="relative w-8 h-20 py-2">
  <input type="checkbox" id="tool_button" class="hidden peer" />
  <div
    class="flex items-center h-full bg-purple-400 rounded-lg w-72 -right-64 peer-checked:right-3 p-0.5 shadow-[0_2px_10px_rgba(0,0,0,0.24)] absolute transition-all duration-300 cursor-pointer"
  >
    <svg
      xmlns="http://www.w3.org/2000/svg"
      width="28"
      height="28"
      viewBox="0 0 24 24"
      fill="#fff"
      stroke="#fff"
      stroke-width="2"
      stroke-linecap="round"
      stroke-linejoin="round"
      class="ml-0.5 feather feather-more-vertical"
    >
      <circle cx="12" cy="12" r="1"></circle>
      <circle cx="12" cy="5" r="1"></circle>
      <circle cx="12" cy="19" r="1"></circle>
    </svg>
    <div
      class="flex flex-row items-center justify-center w-full h-full bg-purple-300 border border-purple-400 rounded-lg"
    >
      <div class="flex flex-col items-center justify-center flex-grow">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          viewBox="0 0 24 24"
          fill="none"
          stroke="#9370DB"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-twitter"
        >
          <path
            d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"
          ></path>
        </svg>
        <p class="text-sm font-bold text-purple-800 uppercase text-nowrap">
          Twitter
        </p>
      </div>
      <div class="flex flex-col items-center justify-center flex-grow">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          viewBox="0 0 24 24"
          fill="none"
          stroke="#9370DB"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-twitch"
        >
          <path d="M21 2H3v16h5v4l4-4h5l4-4V2zm-10 9V7m5 4V7"></path>
        </svg>
        <p class="text-sm font-bold text-purple-800 uppercase text-nowrap">
          Twitch
        </p>
      </div>
      <div class="flex flex-col items-center justify-center flex-grow">
        <svg
          xmlns="http://www.w3.org/2000/svg"
          width="24"
          height="24"
          viewBox="0 0 24 24"
          fill="none"
          stroke="#9370DB"
          stroke-width="2"
          stroke-linecap="round"
          stroke-linejoin="round"
          class="feather feather-triangle"
        >
          <path
            d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"
          ></path>
        </svg>
        <p class="text-sm font-bold text-purple-800 uppercase text-nowrap">
          Go top
        </p>
      </div>
    </div>
  </div>
</label>
کد CSS
.absolute{position:absolute}.relative{position:relative}.-right-64{right:-16rem}.ml-0\.5{margin-left:0.125rem}.flex{display:flex}.hidden{display:none}.h-20{height:5rem}.h-full{height:100%}.w-72{width:18rem}.w-8{width:2rem}.w-full{width:100%}.flex-grow{flex-grow:1}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.text-nowrap{text-wrap:nowrap}.rounded-lg{border-radius:0.5rem}.border{border-width:1px}.border-purple-400{--tw-border-opacity:1;border-color:rgb(192 132 252 / var(--tw-border-opacity))}.bg-purple-300{--tw-bg-opacity:1;background-color:rgb(216 180 254 / var(--tw-bg-opacity))}.bg-purple-400{--tw-bg-opacity:1;background-color:rgb(192 132 252 / var(--tw-bg-opacity))}.p-0\.5{padding:0.125rem}.py-2{padding-top:0.5rem;padding-bottom:0.5rem}.text-sm{font-size:0.875rem;line-height:1.25rem}.font-bold{font-weight:700}.uppercase{text-transform:uppercase}.text-purple-800{--tw-text-opacity:1;color:rgb(107 33 168 / var(--tw-text-opacity))}.shadow-\[0_2px_10px_rgba\(0\2c 0\2c 0\2c 0\.24\)\]{--tw-shadow:0 2px 10px rgba(0,0,0,0.24);--tw-shadow-colored:0 2px 10px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(0.4, 0, 0.2, 1);transition-duration:150ms}.duration-300{transition-duration:300ms}.peer:checked ~ .peer-checked\:right-3{right:0.75rem}
نوع: checkbox
تاریخ ایجاد: 2026/06/05
آخرین بروزرسانی: 2026/06/05