An open API service indexing awesome lists of open source software.

https://github.com/exercism/react-active-background


https://github.com/exercism/react-active-background

community-contributions-paused

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

        

# react-active-background

## Requirements

- `react` >= 16.13.1
- `react-dom` >= 16.13.1

## Usage

Using `create-react-app`'s boiler-plate starter:

```typescript
import * as React from 'react'
import logo from './logo.svg'
import './App.css'

import { ActiveBackground, Confetti } from '@exercism/active-background'

function App() {
return (




logo


Edit src/App.tsx and save to reload.



Learn React




)
}

export default App
```

## Extending with your own animation

You can extend the background with your own canvas based animation by creating a class which fulfills the following:

```typescript
export interface IActiveBackgroundPatternConstructor {
new (
canvas: HTMLCanvasElement,
options: ActiveBackgroundPatternOptions
): IActiveBackgroundPattern
}

export interface IActiveBackgroundPattern {
render(): void
start(): void
stop(): void
}
```

## Authors

This library was originally created by @neenjaw. It is maintained by @neenjaw, @sleeplessbyte and the Exercism team. See the [GitHub contributors graph](https://github.com/exercism/react-active-background/graphs/contributors) for a full list of contributors.