openpencil/packages/docs/programmable/sdk/api/advanced/use-gradient-stops.md

17 lines
540 B
Markdown
Raw Normal View History

---
title: useGradientStops
description: Gradient-stop state and mutation helper for fill editors.
---
# useGradientStops
`useGradientStops(fill, onUpdate)` manages active-stop state, subtype switching, stop dragging, and color or opacity updates for gradient fills.
Use it when building custom gradient editors beyond the packaged primitives.
## Related APIs
- [GradientEditorRoot](../components/gradient-editor-root)
- [GradientEditorBar](../components/gradient-editor-bar)
- [GradientEditorStop](../components/gradient-editor-stop)