Knit UI
GitHub

Playground

Loading playground…

true
false
false
Playground
<AngleSlider
  aria-label="angle"
  size="xxl"
  step={1}
  withLabel
  disabled={false}
  restrictToMarks={false}
/>

Examples

Sizes

Full token size scale, from xxs to xxl.

Loading example…

SizesSourceStorybook

Shadows

Elevation via the shared shadow ladder — inherited from Box, so every component accepts it; no shadow unless set.

Loading example…

ShadowsSourceStorybook

Numeric Size

Numeric custom diameter for exact pixel-sized use cases.

Loading example…

Numeric SizeSourceStorybook

Disabled

Disabled state — reduced opacity and all pointer/keyboard interactions suppressed.

Loading example…

DisabledSourceStorybook

With Marks

Marks displayed around the ring at cardinal and ordinal angles.

Loading example…

With MarksSourceStorybook

Restricted To Marks

restrictToMarks snaps the thumb to the nearest mark; arrow keys cycle between them.

Loading example…

Restricted To MarksSourceStorybook

Custom Label

formatLabel replaces the plain number with a custom React node.

Loading example…

Custom LabelSourceStorybook

Controlled

Fully controlled — the external state drives the slider and is displayed next to it.

Loading example…

ControlledSourceStorybook

No Label

withLabel={false} hides the centre value, leaving a clean ring.

Loading example…

No LabelSourceStorybook

Styles

Per-slot styles targets individual parts — here the frame, thumbKnob, and label.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
aria-labelstring | undefinedangleAccessible label for the slider thumb.
defaultValuenumber | undefined0Uncontrolled initial value.
disabled systemboolean | undefinedfalseDisable all interactions.
formatLabel((value: number) => ReactNode) | undefined—Format the centre label from the current value.
marksAngleSliderMark[] | undefined—Marks displayed around the ring.
namestring | undefined—Hidden input `name`, for uncontrolled form submission.
onChange((value: number) => void) | undefined—Called on every value change while dragging / on key press.
onChangeEnd((value: number) => void) | undefined—Called once the selection is finished (pointer up / key press).
onScrubEnd(() => void) | undefined—Called when a scrub gesture ends (pointer up).
onScrubStart(() => void) | undefined—Called when a scrub gesture starts (pointer down).
restrictToMarksboolean | undefinedfalseRestrict selectable values to the marks array.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined——
size systemnumber | "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
"xxl"Diameter token from the $size scale. Numeric px values are also supported.
stepnumber | undefined1Angle step between selectable values.
styles systemSlotStyles<AngleSliderStyles> | undefined—Per-slot style sugar — props spread onto the matching styled part.
tabIndexnumber | undefined—Tab index of the focusable thumb.
theme systemThemeName | null | undefined—Applies a theme to this element
thumbSizenumber | undefined—Length of the thumb knob in px. Derived from `size` by default.
valuenumber | undefined—Controlled value (0–359).
withLabelboolean | undefinedtrueShow the current value in the centre of the ring.

Style slots

Every part of AngleSlider can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotTargets
frameProps for the ring root (AngleSlider.Frame).
labelProps for the centre value label (AngleSlider.Label).
markProps for each rotated mark wrapper (AngleSlider.Mark).
markLabelProps for each mark label (AngleSlider.MarkLabel).
marksProps for the marks container (AngleSlider.Marks).
markTickProps for each mark tick (AngleSlider.MarkTick).
thumbProps for the rotated thumb bar (AngleSlider.Thumb).
thumbKnobProps for the visible thumb knob (AngleSlider.ThumbKnob).
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<TamaguiElement> | undefined

Plus 495 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.

Edit this page on GitHub