Skip to main content

CrosshairButtonConfig

type CrosshairButtonConfig = {
cornerRadius?: number;
enabled?: boolean;
hoverBoost?: number;
};

Source: types/src/index.ts:1234

The crosshair plus button: a "+" drawn inside the crosshair's price badge, turning the whole badge into a button — the order-entry affordance.

Opt-in: nothing renders unless enabled is true. The badge takes its fill and text color from crosshair.badgeColor / crosshair.badgeTextColor (defaulting to theme.crosshairTarget / theme.badgeText) and grows leftward to fit the plus, so the price stays in the y-axis column. Clicking (or tapping) anywhere on it locks the crosshair at that price and fires onCrosshairButton, which is where your own UI (e.g. "Buy limit" / "Sell limit") comes in.

Properties​

cornerRadius?​

optional cornerRadius?: number;

Source: types/src/index.ts:1242

Badge corner radius in px, clamped to 0..height/2. Default 6 (the plain badge's radius). Any value at or above half the height draws a fully rounded pill.


enabled?​

optional enabled?: boolean;

Source: types/src/index.ts:1236

Show the plus inside the crosshair price badge. Default false.


hoverBoost?​

optional hoverBoost?: number;

Source: types/src/index.ts:1248

How much the hovered (or open) badge brightens, as a channel multiplier. 1 disables the highlight. Default 1.25. Hover is web only — touch platforms only see the open state.