구성 요소 등급 시스템 Monospace_Developer_Rating_System_Component

Monospace_Developer_Rating_System_Component

소셜 미디어 인터페이스를 위한 깔끔한 코드 기반 등급 시스템 구성 요소로, 고정 폭 글꼴, 터미널 미학 및 보색을 특징으로 합니다. 다크 모드 지원으로 완벽하게 반응합니다.

미리 보기

HTML 코드

<div class="font-['JetBrains_Mono',_monospace] bg-gradient-to-br from-indigo-50 to-purple-50 text-slate-800 dark:from-slate-900 dark:to-slate-800 dark:text-slate-200 p-6 sm:p-8 md:p-10 rounded-lg shadow-xl border border-solid border-indigo-200 dark:border-slate-700 max-w-sm mx-auto transition-colors duration-300">
  <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
  <style>
    /* Basic reset for illustration purposes within the component */
    .rating-star-input { display: none; }
    .rating-star-label { cursor: pointer; transition: color 0.2s ease-in-out, transform 0.2s ease-in-out; }
    .rating-star-label:hover { transform: scale(1.1); }
    .rating-star-label:focus { outline: none; box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.5); /* indigo-500 */ }
    .rating-star-input:checked ~ .rating-star-label.star-icon,
    .rating-star-input:checked + .rating-star-label.star-icon {
      color: #7c3aed; /* violet-600 for checked stars */
    }
    .dark .rating-star-input:checked ~ .rating-star-label.star-icon,
    .dark .rating-star-input:checked + .rating-star-label.star-icon {
      color: #a78bfa; /* violet-400 for dark mode checked stars */
    }
    .rating-star-label.star-icon {
      color: #94a3b8; /* slate-400 for unchecked stars */
    }
    .dark .rating-star-label.star-icon {
      color: #475569; /* slate-700 for dark mode unchecked stars */
    }
  </style>

  <div class="flex items-center mb-4">
    <img src="https://randomuser.me/api/portraits/men/45.jpg" alt="User Avatar" class="w-12 h-12 rounded-full border-2 border-indigo-400 dark:border-violet-600 mr-4 shadow-md">
    <div>
      <p class="text-lg font-bold text-slate-900 dark:text-slate-100">@dev_master</p>
      <p class="text-xs text-slate-600 dark:text-slate-400">Senior Front-End Dev</p>
    </div>
  </div>

  <h3 class="text-xl font-bold mb-3 text-slate-900 dark:text-slate-100">Rate this project:</h3>

  <div class="flex justify-center text-3xl mb-6">
    <input type="radio" id="star5" name="rating" value="5" class="rating-star-input">
    <label for="star5" class="rating-star-label star-icon" aria-label="5 stars">★</label>
    <input type="radio" id="star4" name="rating" value="4" class="rating-star-input">
    <label for="star4" class="rating-star-label star-icon" aria-label="4 stars">★</label>
    <input type="radio" id="star3" name="rating" value="3" class="rating-star-input">
    <label for="star3" class="rating-star-label star-icon" aria-label="3 stars">★</label>
    <input type="radio" id="star2" name="rating" value="2" class="rating-star-input">
    <label for="star2" class="rating-star-label star-icon" aria-label="2 stars">★</label>
    <input type="radio" id="star1" name="rating" value="1" class="rating-star-input">
    <label for="star1" class="rating-star-label star-icon" aria-label="1 star">★</label>
  </div>

  <div class="mb-6">
    <label for="comment" class="block text-sm font-medium text-slate-700 dark:text-slate-300 mb-2">Add a quick comment:</label>
    <textarea id="comment" class="w-full p-3 bg-white dark:bg-slate-700 border border-indigo-300 dark:border-slate-600 rounded-md shadow-sm text-slate-800 dark:text-slate-200 placeholder-slate-400 dark:placeholder-slate-500 focus:ring-2 focus:ring-indigo-500 focus:border-transparent transition-all duration-200 text-sm h-24 resize-none" placeholder="e.g., 'Excellent codebase!'"></textarea>
  </div>

  <button class="w-full py-3 px-4 bg-violet-600 hover:bg-violet-700 dark:bg-violet-700 dark:hover:bg-violet-600 text-white font-bold rounded-lg shadow-md hover:shadow-lg focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2 dark:focus:ring-offset-slate-900 transition-all duration-200 text-lg">
    SUBMIT RATING <span class="text-xs ml-2">// &gt;</span>
  </button>

  <div class="mt-6 pt-4 border-t border-indigo-200 dark:border-slate-700 text-xs text-slate-500 dark:text-slate-400 text-center">
    <p><code>[status: live]</code> <span class="mx-1">•</span> <code>build: 0.0.1-beta</code></p>
  </div>
</div>

관련 구성 요소

등급 시스템 구성 요소

미니멀리스트/플랫 디자인 등급 시스템 구성 요소로, 보색 구성표, 적당한 복잡성, 블로그/콘텐츠 소비에 적합합니다. JavaScript 없이 Tailwind CSS 클래스를 사용하여 어두운 테마를 지원하는 반응형 디자인이 특징입니다.

열다

레트로 레이팅 시스템 구성 요소

어스 톤의 레트로/빈티지 등급 시스템 구성 요소로, 비즈니스/기업 웹사이트용으로 설계되었습니다. 반응형 디자인과 어두운 테마를 지원합니다.

열다

등급 시스템 구성 요소

레트로/빈티지 스타일로 디자인된 등급 시스템 구성 요소로, 보색 구성표와 블로그 콘텐츠를 위한 복잡한 인터페이스를 활용합니다. 이 구성 요소는 다크 모드를 지원하며 Tailwind CSS를 사용하여 반응합니다.

열다