Syed

Thermal Dial Widget

Dashboards 49

About

An interactive, skeuomorphic radial temperature dial widget with smooth drag controls, dynamic season/theme palettes, and customizable Celsius/Fahrenheit units. Ideal for smart home thermostats, climate control dashboards, and modern hardware interfaces.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Thermal Dial Widget to your project and fits it to your theme.

Code

How Thermal Dial Widget is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";

import React, { useEffect, useState } from "react";
import { ThermalDialWidget } from "@/components/ui/thermal-dial-widget";

/**
 * 21st.dev reads this top-level settings object and creates
 * the interactive Controls panel beside the component preview.
 *
 * Keep these values literal so the registry can detect them.
 */
const settings = {
  value: 38,
  min: 16,
  max: 45,
  step: 1,
  label: "Summer",
  autoSeason: true,
  variant: "ember",
  disabled: false,
  scale: 0.86,
  unit: "C",
};

const VALID_VARIANTS: ThermalVariant[] = [
  "ember",
  "solar",
  "amber",
  "frost",
  "auto",
];

export default function ThermalDialWidgetDemo(
  props: Partial<typeof settings>
) {
  const config = { ...settings, ...props };

  // Keep the dial interactive while still allowing the 21st.dev
  // Controls panel to update its initial temperature.
  const [temperature, setTemperature] = useState(config.value);

  useEffect(() => {
    setTemperature(config.value);
  }, [config.value]);

  // Guard text-field values so invalid entries cannot break the palette.
  const variant: ThermalVariant = VALID_VARIANTS.includes(
    config.variant as ThermalVariant
  )
    ? (config.variant as ThermalVariant)
    : "ember";

  const unit: "C" | "F" = config.unit === "F" ? "F" : "C";

  return (
    <div className="relative flex min-h-screen w-full flex-col items-center justify-center overflow-hidden bg-black text-zinc-100 selection:bg-orange-500/30">
      <main className="flex flex-1 items-center justify-center p-4">
        <ThermalDialWidget
          value={temperature}
          min={config.min}
          max={config.max}
          step={config.step}
          label={config.label}
          autoSeason={config.autoSeason}
          variant={variant}
          disabled={config.disabled}
          scale={config.scale}
          unit={unit}
          onChange={(nextTemperature) => {
            setTemperature(nextTemperature);
          }}
        />
      </main>
    </div>
  );
}

More by Syed

View all
  • Emotion Wheel v2

    Emotion Wheel v2

    185
  • Projec tWorkflow Tree

    Projec tWorkflow Tree

    175
  • Animated Beam Integration

    Animated Beam Integration

    175
  • SpatialCardCarousel

    SpatialCardCarousel

    150
  • Editorial Column Showcase

    Editorial Column Showcase

    136
  • Agency Bento Grid

    Agency Bento Grid

    110
  • Unlimited Design Hero

    Unlimited Design Hero

    107
  • Morphing Island Navbar

    Morphing Island Navbar

    93

More in Dashboards

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    774
  • Analytics Dashboard

    Analytics Dashboard

    89
  • Creator Dashboard

    Creator Dashboard

    222
  • Insights Dashboard

    Insights Dashboard

    47
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    500
  • serf dashboard

    serf dashboard

    146
  • Dashboard with Collapsible Sidebar

    Dashboard with Collapsible Sidebar

    2.7K
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    74