Scan your whole stack
Are you using @xsolla/xui-gradient-picker?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.239.0
@xsolla/xui-gradient-picker was last scanned on 29 Nov 2026 at version 0.239.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.239.0 LATEST | 29 Nov 2026 | No rules fired |
| 0.238.0 | 25 Nov 2026 | No rules fired |
| 0.237.0 | 25 Nov 2026 | No rules fired |
| 0.236.0 | 25 Nov 2026 | Not shown |
| 0.235.0 | 25 Nov 2026 | Not shown |
Findings for v0.239.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.239.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
A cross-platform React gradient picker: a live preview track with draggable colour stops, per-stop colour and opacity editing via ColorPicker, and CSS-compatible gradient output.
A compound component for defining a CSS-style colour gradient. Combines a visual gradient preview track with draggable stop markers and integrates with ColorPicker to edit the colour and opacity of each stop individually. Supports three gradient types and up to five colour stops.
The angle can only be controlled for linear gradients and angular gradients.
While dragging a gradient stop, the row of the corresponding stop transitions into the active state.
npm install @xsolla/xui-gradient-picker
import * as React from "react";
import { GradientPicker } from "@xsolla/xui-gradient-picker";
export default function BasicGradientPicker() {
return <GradientPicker onChange={({ css }) => console.log(css)} />;
}
import * as React from "react";
import {
GradientPicker,
DEFAULT_GRADIENT,
toCssGradient,
type GradientValue,
} from "@xsolla/xui-gradient-picker";
export default function ControlledGradientPicker() {
const [gradient, setGradient] = React.useState<GradientValue>(
DEFAULT_GRADIENT
);
return (
<>
<GradientPicker
value={gradient}
onChange={({ value }) => setGradient(value)}
/>
<div style={{ backgroundImage: toCssGradient(gradient) }} />
</>
);
}
import * as React from "react";
import { GradientPicker } from "@xsolla/xui-gradient-picker";
export default function RadialGradient() {
return (
<GradientPicker
defaultValue={{
type: "radial",
angle: 0,
stops: [
{ id: "stop-1", color: "#D9D9D9", position: 0, opacity: 100 },
{ id: "stop-2", color: "#22A8C3", position: 100, opacity: 100 },
],
}}
/>
);
}
Radial gradients have no rotation, so the angle field is hidden for them.
import * as React from "react";
import { GradientPicker } from "@xsolla/xui-gradient-picker";
export default function AngularGradient() {
return (
<GradientPicker
typeLabels={{ angular: "Conic gradient" }}
onChange={({ css }) => console.log(css)}
/>
);
}
import { GradientPicker } from "@xsolla/xui-gradient-picker";
<GradientPicker
value={gradient} // Controlled gradient value
defaultValue={initial} // Initial value for uncontrolled usage
onChange={handleChange} // ({ value, css }) => void
gradientTypes={["linear", "radial", "angular"]} // Types offered in the selector
typeLabels={{ angular: "Conic gradient" }} // Option label overrides
minStops={1} // Floor for removal
maxStops={5} // Ceiling for adding
disabled={false} // Disable every control
stopsLabel="Stops" // Heading above the stop list
/>;
GradientPickerProps:
| Prop | Type | Default | Description |
|---|---|---|---|
testID |
string |
— | Test ID for testing frameworks. On web this renders as data-testid; on React Native it renders as testID. |
| value | GradientValue |
— | Controlled gradient value. Pair with onChange. |
| defaultValue | GradientValue |
DEFAULT_GRADIENT |
Initial gradient value for uncontrolled usage. |
| onChange | (event: GradientPickerChangeEvent) => void |
— | Fired on every interaction. Receives the new value and its CSS string. |
| gradientTypes | GradientType[] |
["linear", "radial", "angular"] |
Gradient types offered in the selector, in display order. |
| typeLabels | Partial<Record<GradientType, string>> |
— | Overrides for the gradient-type option labels. |
| minStops | number |
1 |
Smallest number of stops the user may reduce the gradient to. |
| maxStops | number |
5 |
Largest number of stops the user may add. |
| disabled | boolean |
false |
Disables every control and blocks track interaction. |
| typeAriaLabel | string |
"Gradient type" |
Accessible name for the gradient-type selector. |
| angleAriaLabel | string |
"Gradient angle" |
Accessible name for the angle field. |
| stopsLabel | string |
"Stops" |
Heading rendered above the stop list. |
type GradientType = "linear" | "radial" | "angular";
interface GradientStop {
id: string; // Stable identity, survives reordering
color: string; // "#RRGGBB"
position: number; // 0–100 (percent)
opacity: number; // 0–100 (percent)
}
interface GradientValue {
type: GradientType;
angle: number; // Degrees; ignored for "radial"
stops: GradientStop[];
}
interface GradientPickerChangeEvent {
value: GradientValue;
css: string; // e.g. "linear-gradient(0deg, #D9D9D9 0%, #22A8C3 100%)"
}
Every gradient operation is a pure function, so a consuming surface can render or transform a gradient without mounting the component.
| Helper | Signature | Description |
|---|---|---|
toCssGradient(value) |
(value: GradientValue) => string |
Serialises to linear-gradient() / radial-gradient() / conic-gradient(). |
toPreviewCssGradient(value) |
(value: GradientValue) => string |
Left-to-right ramp used by the preview track, regardless of gradient type. |
interpolateColorAt(stops, position) |
(stops: GradientStop[], position: number) => { color, opacity } |
Samples the gradient — the colour a stop added at position inherits. |
addStopAt(stops, position, max) |
(…) => GradientStop[] |
Adds an interpolated stop; returns the input array unchanged at max. |
removeStop(stops, id, min) |
(…) => GradientStop[] |
Removes by id; returns the input array unchanged at min. |
updateStop(stops, id, patch) |
(…) => GradientStop[] |
Applies a clamped, normalised patch to one stop. |
sortStops(stops) |
(stops: GradientStop[]) => GradientStop[] |
Position order, stable on ties, non-mutating. |
supportsAngle(type) |
(type: GradientType) => boolean |
false for radial — the angle field is hidden for it. |
DEFAULT_GRADIENT |
GradientValue |
The two-stop #D9D9D9 → #22A8C3 linear ramp from the Figma component. |
| Type | Output |
|---|---|
linear |
linear-gradient(<angle>deg, <stops>) |
radial |
radial-gradient(circle, <stops>) |
angular |
conic-gradient(from <angle>deg, <stops>) |
A fully opaque stop serialises to its hex value; a partially transparent stop
serialises to rgba(). A gradient with a single stop is emitted twice (0% and
100%) because CSS gradients require at least two colour stops.
| Key | Action |
|---|---|
| Tab / Shift+Tab | Move focus between markers, fields and buttons |
| ← / → (marker focused) | Move the stop by 1% |
| Shift+← / Shift+→ | Move the stop by 10% |
| Home / End | Jump the stop to 0% / 100% |
| Enter / Space | Activate the stop and open its ColorPicker |
| Delete / Backspace | Remove the stop (blocked at minStops) |
| Escape | Close the ColorPicker; focus returns to the marker |
layer/float colour token (theme.colors.layer.float) so it reads as a floating surface in both light and dark mode, matching ColorPicker.theme.shape.contextMenu.lg.borderRadius.theme.colors.background.primary for their ring so the stop colour stays legible against any track fill.role="slider" with aria-label="Stop N position", aria-valuenow, aria-valuemin="0", aria-valuemax="100" and aria-valuetext="N%".aria-hidden="true" and is not focusable — position is always available numerically from the per-stop position field and the marker's aria-valuetext.aria-label.These are deliberate v1 boundaries, tracked as follow-ups:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.