chessboard2
Home Examples Docs Download

Basic Usage

  • Empty Board
  • Start Position
  • FEN String
  • Position Object
  • Multiple Boards

Config

  • Start Position
  • Position FEN
  • Position Object
  • Orientation
  • Notation
  • Draggable Pieces
  • Piece Theme String
  • Piece Theme Function
  • Animation Speed
  • Spare Pieces

Methods

  • Get Position
  • Set Position
  • Set Position Instantly
  • Set Random Position
  • Clear Board
  • Move Pieces
  • Analysis Arrows
  • Circles
  • Orientation
  • Destroy Board
  • Resize

Events

  • onChange
  • onDragStart
  • onDragStart Prevent Drag
  • onDragMove
  • onDrop
  • onDrop Snapback
  • onDrop Remove
  • onSnapbackEnd
  • onMoveEnd
  • Mouseenter / Mouseleave Squares
  • Mousedown / Mouseup Squares

Integration

  • Only Allow Legal Moves
  • Play Random Computer
  • Random vs Random
  • Highlight Legal Moves
  • Piece Highlighting 1
  • Piece Highlighting 2
  • Click to Create Arrows
  • Click to Create Arrows with Preview

chessboard2 is released under the ISC License

the code can be found on GitHub

by Chris Oakman