Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@exercism/active-background

Package Overview
Dependencies
Maintainers
3
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@exercism/active-background

Give your elements an animated canvas background!

  • 0.3.0
  • npm
  • Socket score

Version published
Weekly downloads
9
decreased by-40%
Maintainers
3
Weekly downloads
 
Created
Source

react-active-background

Requirements

  • react >= 16.13.1
  • react-dom >= 16.13.1

Usage

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

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

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

function App() {
  return (
    <div className="App">
      <header className="App-header">
        <ActiveBackground pattern={Confetti}>
          <img src={logo} className="App-logo" alt="logo" />
          <p>
            Edit <code>src/App.tsx</code> and save to reload.
          </p>
          <a
            className="App-link"
            href="https://reactjs.org"
            target="_blank"
            rel="noopener noreferrer"
          >
            Learn React
          </a>
        </ActiveBackground>
      </header>
    </div>
  )
}

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:

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 for a full list of contributors.

Keywords

FAQs

Package last updated on 19 Apr 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc