Skip to content

topce/ngx-chessground

Repository files navigation

NgxChessground

npm version License: GPL-3.0

Angular wrapper for ornicar/chessground, the premier open-source chess UI library.

Demo

Check out the live demo at https://topce.github.io/ngx-chessground/

Features

  • 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

Repository Structure

This repository contains two Angular projects:

  1. ngx-chessground - Angular library that wraps the chessground chess UI
  2. 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)

Installation

For Users

Install the library in your Angular project:

npm install ngx-chessground chess.js chessground snabbdom

For Contributors

Clone and set up the development environment:

git clone https://github.com/topce/ngx-chessground.git
cd ngx-chessground
npm install
npm start

Documentation

To generate and view the documentation:

npm run compodoc

This will start a documentation server at http://localhost:9090

Usage

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>

Publishing

To publish the library to npm:

npm run publish:lib

Or use the PowerShell script for a guided publishing process:

.\publish.ps1

Version Compatibility

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

Roadmap

  • Create Angular components for online playing (piece promotion in progress)
  • Develop a full-featured Angular PGN viewer
  • Add comprehensive testing suite
  • Enhance accessibility features

License

GPL-3.0 or later

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

angular wrapper for ornicar/chessground

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •