Skip to main content
Renders a cross shape (plus sign) formed by intersecting horizontal and vertical lines. The Cross component is useful for marking specific points or creating crosshair indicators in charts.

Props

Positioning

number
default:"0"
The x-coordinate of the vertical line of the cross in pixels.
number
default:"0"
The y-coordinate of the horizontal line of the cross in pixels.
number
default:"0"
Width of the cross (horizontal line length) in pixels.
number
default:"0"
Height of the cross (vertical line length) in pixels.
number
default:"0"
The y-coordinate of the top left point in the boundary box of the cross.
number
default:"0"
The x-coordinate of the top left point in the boundary box of the cross.

Appearance

number
CSS class name to apply to the cross element.

SVG properties

This component accepts all standard SVG path element properties including:
  • stroke - Line color
  • strokeWidth - Line width
  • opacity - Opacity value
  • style - Inline styles
All SVG path event handlers are also supported (onClick, onMouseEnter, etc.).

Examples

Basic cross

Crosshair indicator