Components / Selects and toggles
Star rating
Radio stars to pick from, a half-star version, and a read-only score. Every star up to the chosen one fills in, the rest stay faint.
The code
Plain HTML and CSS on your kit's variables. Put it next to tokens/variables.css from your kit's files and it draws in your look.
<div class="ukc-toggle-daisyui-rating">
<div class="rt">
<div class="q">
<p class="t" id="ukc-toggle-daisyui-rating-a">Rate the crew</p>
<div class="rating" role="radiogroup" aria-labelledby="ukc-toggle-daisyui-rating-a"><input class="none" type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="No rating"><input type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="1 star"><input type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="2 stars"><input type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="3 stars"><input type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="4 stars" checked><input type="radio" name="ukc-toggle-daisyui-rating-a" aria-label="5 stars"></div>
</div>
<div class="q">
<p class="t" id="ukc-toggle-daisyui-rating-b">Finish quality</p>
<div class="line"><div class="rating half" role="radiogroup" aria-labelledby="ukc-toggle-daisyui-rating-b"><input class="none" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="No rating"><input class="h1" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="0.5 stars"><input class="h2" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="1 star"><input class="h1" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="1.5 stars"><input class="h2" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="2 stars"><input class="h1" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="2.5 stars"><input class="h2" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="3 stars"><input class="h1" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="3.5 stars" checked><input class="h2" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="4 stars"><input class="h1" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="4.5 stars"><input class="h2" type="radio" name="ukc-toggle-daisyui-rating-b" aria-label="5 stars"></div><span class="v">3.5</span></div>
</div>
<div class="line">
<div class="rating sm" role="img" aria-label="Rated 4 out of 5"><span class="on"></span><span class="on"></span><span class="on"></span><span class="on"></span><span></span></div>
<span class="v">4.0 · 38 jobs</span>
</div>
</div>
</div>
.ukc-toggle-daisyui-rating { position: relative; font-family: var(--uk-font-body, system-ui, sans-serif); color: var(--uk-ink); font-size: 15px; line-height: 1.5;
--tint: color-mix(in srgb, var(--uk-accent) 12%, var(--uk-paper));
--tint-strong: color-mix(in srgb, var(--uk-accent) 22%, var(--uk-paper));
--accent-deep: color-mix(in srgb, var(--uk-accent) 72%, black);
--ink-soft: color-mix(in srgb, var(--uk-ink) 8%, var(--uk-paper));
--line-strong: color-mix(in srgb, var(--uk-ink) 32%, var(--uk-paper));
--danger-tint: color-mix(in srgb, var(--uk-danger) 12%, var(--uk-paper));
--high-tint: color-mix(in srgb, var(--uk-highlight) 28%, var(--uk-paper)); }
.ukc-toggle-daisyui-rating *, .ukc-toggle-daisyui-rating *::before, .ukc-toggle-daisyui-rating *::after { box-sizing: border-box; }
.ukc-toggle-daisyui-rating :where(h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote) { margin: 0; }
.ukc-toggle-daisyui-rating :where(ul, ol) { padding: 0; list-style: none; }
.ukc-toggle-daisyui-rating :where(button, input, select, textarea) { font: inherit; color: inherit; }
.ukc-toggle-daisyui-rating :where(a) { color: inherit; }
.ukc-toggle-daisyui-rating svg { flex: none; }
.ukc-toggle-daisyui-rating .rt { display: grid; gap: 20px; }
.ukc-toggle-daisyui-rating .q { display: grid; gap: 6px; justify-items: start; }
.ukc-toggle-daisyui-rating .t { font-size: 14px; font-weight: 600; }
.ukc-toggle-daisyui-rating .line { display: flex; align-items: center; gap: 10px; }
.ukc-toggle-daisyui-rating .rating { --sz: 30px; display: inline-flex; align-items: center; }
.ukc-toggle-daisyui-rating .rating.half { --sz: 26px; }
.ukc-toggle-daisyui-rating .rating.sm { --sz: 18px; }
.ukc-toggle-daisyui-rating .rating > * { width: var(--sz); height: var(--sz); margin: 0; border: 0; border-radius: 0; background: var(--uk-accent); opacity: 0.2; appearance: none; -webkit-appearance: none; clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ukc-toggle-daisyui-rating .rating input { cursor: pointer; transition: scale var(--uk-motion-duration) var(--uk-motion-ease); }
.ukc-toggle-daisyui-rating .rating .none { width: 8px; background: transparent; }
.ukc-toggle-daisyui-rating .rating.half > * { width: calc(var(--sz) * 0.5); }
.ukc-toggle-daisyui-rating .rating .h1 { clip-path: polygon(100% 0%, 78% 35%, 4% 35%, 64% 57%, 42% 91%, 100% 70%); }
.ukc-toggle-daisyui-rating .rating .h2 { clip-path: polygon(0% 0%, 22% 35%, 96% 35%, 36% 57%, 58% 91%, 0% 70%); }
.ukc-toggle-daisyui-rating .rating .on, .ukc-toggle-daisyui-rating .rating input:checked, .ukc-toggle-daisyui-rating .rating input:has(~ input:checked) { opacity: 1; }
.ukc-toggle-daisyui-rating .rating input:focus-visible { scale: 1.15; outline: none; }
.ukc-toggle-daisyui-rating .rating:focus-within { outline: 2px dashed var(--line-strong); outline-offset: 4px; }
.ukc-toggle-daisyui-rating .v { font-family: var(--uk-font-mono, ui-monospace, monospace); font-size: 12px; color: var(--uk-muted); }
@media (prefers-reduced-motion: reduce) { .ukc-toggle-daisyui-rating .rating input { transition: none; } }
More selects and toggles
All 28- ThemeAlertsMenuJob 2318
Assign to
Mara EllisOmar HaddadTomasz Malek3 of 12 people