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) | undefinedFormat the centre label from the current value.
marksAngleSliderMark[] | undefinedMarks displayed around the ring.
namestring | undefinedHidden input `name`, for uncontrolled form submission.
onChange((value: number) => void) | undefinedCalled on every value change while dragging / on key press.
onChangeEnd((value: number) => void) | undefinedCalled once the selection is finished (pointer up / key press).
onScrubEnd(() => void) | undefinedCalled when a scrub gesture ends (pointer up).
onScrubStart(() => void) | undefinedCalled 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> | undefinedPer-slot style sugar — props spread onto the matching styled part.
tabIndexnumber | undefinedTab index of the focusable thumb.
theme systemThemeName | null | undefinedApplies a theme to this element
thumbSizenumber | undefinedLength of the thumb knob in px. Derived from `size` by default.
valuenumber | undefinedControlled 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.

SlotUsage
framestyles={{ frame: { … } }}
labelstyles={{ label: { … } }}
markstyles={{ mark: { … } }}
markLabelstyles={{ markLabel: { … } }}
markTickstyles={{ markTick: { … } }}
marksstyles={{ marks: { … } }}
thumbstyles={{ thumb: { … } }}
thumbKnobstyles={{ 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.