Rotary Dial
A knurled dial is grabbed and turned, the value counts up with it, and it clicks into its final detent. A free, MIT-licensed Remotion UI block.
$ pnpm dlx shadcn@latest add @remocn/rotary-dialUsage
// src/Root.tsx
import { Composition } from "remotion";
import { RotaryDial } from "@/components/remocn/rotary-dial";
const RotaryDialScene = () => (
<RotaryDial
from={1}
to={10}
unit="×"
label="Render speed"
/>
);
export const RemotionRoot = () => (
<Composition
id="RotaryDial"
component={RotaryDialScene}
durationInFrames={125}
fps={30}
width={1280}
height={720}
/>
);A label and value write in, a cursor grabs a metal dial and turns it, and the value counts from from to to as an arc heats up. The dial clicks into its final detent with a bloom of light. Pass your own from, to, unit and label; it ships light and dark through theme.
The ground is a live gradients.sh shader (GshGround), installed with the component as @remocn/gsh. Pick another look with the ground preset prop.
Props16
| Prop | Type | Default |
|---|---|---|
| from | number1 Starting value on the dial. | |
| to | number10 Final value the dial lands on. | |
| unit | string"×" Unit shown after the number, such as a multiplication sign. | |
| label | string"Render speed" Caption describing the value. | |
| turn | number48 Frames the knob takes to turn from `from` to `to`. | |
| minorTicks | number5 Minor ticks between labelled steps on the scale. | |
| fontFamily | string"Space Grotesk" Typeface for the copy. Load the font in your project first. | |
| accent | string"#3B5BFD" Color of the heated arc. | |
| ink | string— Text color; overrides the theme ink. | |
| background | string— Solid fill in place of the gradient ground; pass "transparent" to drop it. | |
| theme | "dark" | "light""dark" Color scheme. Ships light and dark. | |
| ground | GshPresetId— Shader preset id for the animated background. | |
| groundParams | Partial<GradientParams>— Partial shader parameters that override the ground preset. | |
| scale | number1 Size of the foreground around the frame's center; the background stays put. | |
| delay | number0 Frames to hold the first frame before anything moves. | |
| speed | number1 Playback speed multiplier for the whole timeline. | |
- fromnumber
Starting value on the dial.
Default
1 - tonumber
Final value the dial lands on.
Default
10 - unitstring
Unit shown after the number, such as a multiplication sign.
Default
"×" - labelstring
Caption describing the value.
Default
"Render speed" - turnnumber
Frames the knob takes to turn from `from` to `to`.
Default
48 - minorTicksnumber
Minor ticks between labelled steps on the scale.
Default
5 - fontFamilystring
Typeface for the copy. Load the font in your project first.
Default
"Space Grotesk" - accentstring
Color of the heated arc.
Default
"#3B5BFD" - inkstring
Text color; overrides the theme ink.
- backgroundstring
Solid fill in place of the gradient ground; pass "transparent" to drop it.
- theme"dark" | "light"
Color scheme. Ships light and dark.
Default
"dark" - groundGshPresetId
Shader preset id for the animated background.
- groundParamsPartial<GradientParams>
Partial shader parameters that override the ground preset.
- scalenumber
Size of the foreground around the frame's center; the background stays put.
Default
1 - delaynumber
Frames to hold the first frame before anything moves.
Default
0 - speednumber
Playback speed multiplier for the whole timeline.
Default
1