Skip to content

Semicircle gauges in React

Three semicircle gauges whose needle swings to the value, with figure, label and source readable as text, in pure CSS.

Here is an excerpt of this component's code in React. The full code is free for members, ready to copy into your project.

This component also comes in

Open in a new tab

The code in React

SemicircleGauges.tsx
const styles = `
@keyframes sjs-needle {
  from {
    transform: rotate(-90deg);
  }
}

.sjs-needle {
  transform: rotate(calc(var(--sjs-value) * 1.8deg - 90deg));
  transform-origin: 50% 100%;
  animation: sjs-needle 1.4s cubic-bezier(0.25, 0.8, 0.3, 1.1) 0.2s both;
}

Free component: copy it freely, including for commercial projects.

Statistics components in React
  • A client area page for a small business website: sidebar, four metrics (visits, requests, reply rate and reply time) with their change, an SVG line chart per period and a filterable table of the latest messages, with no chart library.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • A row of guarantees (ten-year insurance, free quote, call-out within 24 hours, RGE and Qualibat labels) that reassures visitors right below the call to action.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four key figures in cards that count up from zero to their value when the section scrolls into view, with icon, unit and label.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four tinted paper cards pinned askew with tape on a dotted background: each figure of the venue's story has its line drawing, its title and its sentence.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component
  • Four key figures in a row, each with its caption, separated by thin rules.

    • Tailwind
    • React
    • CSS
    • WordPress
    Component