0.1.6 • Published 2 years ago

@dark7storm/clippy-react v0.1.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Originally forked from https://github.com/luiz-chagas/react-clippy

Clippy React

React wrapper around ClippyJS

Installation

npm install --save clippy-react

Usage

Currently there's only a ref version of the Clippy component. A declarative version is in the works.

import { Clippy } from "clippy-react";

export const Demo = () => {
  const clippy = useRef<Clippy>();

  const onClippyLoad = () => {
    if(clippy.current){
      clippy.current.show();
      clippy.current.speak('Hello World');
      clippy.current.play('GetTechy');
    }
  }

  return (
    <>
      <h1>Hello World</h1>
      <Clippy name="Clippy" ref={clippy} onLoad={onClippyLoad}>
    </>;
  );
}

Screenshot

Clippy

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago