# Semicircle Gauge

> A half-circle gauge drawn with a conic gradient and a mask, showing a score from 0 to 100.

- Category: [CSS Loaders & Spinners](https://copy-css.com/category/loaders)
- Tags: meter, conic-gradient, dashboard, score, speedometer
- Live preview: https://copy-css.com/snippets/semicircle-gauge
- License: Free for personal and commercial use. No signup, no attribution required.

## HTML

```html
<div class="gauge-semi" style="--value: 68" role="meter" aria-label="Score" aria-valuenow="68" aria-valuemin="0" aria-valuemax="100">68</div>
```

## CSS

```css
.gauge-semi {
  --value: 0;
  position: relative;
  display: grid;
  place-items: end center;
  width: 200px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  color: #78350f;
  font: 800 40px/1 system-ui, sans-serif;
}

/* A full ring, with its bottom half hidden by overflow */
.gauge-semi::before {
  content: "";
  position: absolute;
  inset: 0 0 -100%;
  border-radius: 50%;
  background: conic-gradient(
    from -90deg,
    #f59e0b calc(var(--value) * 1.8deg),
    #fde68a 0 180deg,
    #0000 0
  );
  -webkit-mask: radial-gradient(farthest-side, #0000 calc(100% - 22px), #000 calc(100% - 21px));
  mask: radial-gradient(farthest-side, #0000 calc(100% - 22px), #000 calc(100% - 21px));
}
```

## Notes

- This CSS Semicircle Gauge is 27 lines of pure CSS (0.7 KB) with no JavaScript and no dependencies. It uses radial gradients, conic gradients, masks and CSS Grid.
- Customize with: `--value`.
- In JSX use `className` instead of `class`. In Tailwind projects put the CSS in the global stylesheet.
