Angular wrapper for ornicar/chessground, the premier open-source chess UI library.
Check out the live demo at https://topce.github.io/ngx-chessground/
- Complete Angular wrapper for chessground
- Easy integration with Angular applications
- All features from the original chessground library
- Compatible with Angular 20
- Enhanced examples with game replay functionality
This repository contains two Angular projects:
- ngx-chessground - Angular library that wraps the chessground chess UI
- ngx-chessground-example - Demo application with various examples, including:
- All examples from the original chessground-examples repository
- Game replay with different time controls:
- One second per move
- Real-time replay
- Proportional replay (fit to one minute)
- Option to play against yourself (like Robert James Fischer)
Install the library in your Angular project:
npm install ngx-chessground chess.js chessground snabbdom
Clone and set up the development environment:
git clone https://github.com/topce/ngx-chessground.git
cd ngx-chessground
npm install
npm start
To generate and view the documentation:
npm run compodoc
This will start a documentation server at http://localhost:9090
import { NgxChessgroundModule } from 'ngx-chessground';
@NgModule({
imports: [
NgxChessgroundModule
]
})
export class AppModule { }
Then in your component template:
<ngx-chessground
[width]="400"
[height]="400"
[config]="config">
</ngx-chessground>
To publish the library to npm:
npm run publish:lib
Or use the PowerShell script for a guided publishing process:
.\publish.ps1
NgxChessground | Angular |
---|---|
20.x | 20.x |
19.x | 19.x |
18.x | 18.x |
17.x | 17.x |
16.x | 16.x |
15.x | 15.x |
- Create Angular components for online playing (piece promotion in progress)
- Develop a full-featured Angular PGN viewer
- Add comprehensive testing suite
- Enhance accessibility features
GPL-3.0 or later
Contributions are welcome! Please feel free to submit a Pull Request.