react-moon

    2.0.2 • Public • Published

    🌚 react-moon

    Moon component for React

    NPM

    🌑🌒🌓🌔🌕🌖🌗🌘🌑

    Install

    npm install --save react-moon

    Usage

    import React from 'react';
    import Moon from 'react-moon';
     
    export default () => <Moon phase={0.16} size={128} />;

    props

    prop description type default
    phase Moon phase from 0 to 1. Full moon is 0.5. Number 0.16
    size Diameter in pixels Number 80
    lightColor Color of the light side String white
    darkColor Color of the dark side String black
    border CSS value for border String 4px solid black
    rotation CSS value for rotation <angle> String 0deg

    Known issues

    • Size must be static and, if bigger, the moon will overflow its container

    Keywords

    none

    Install

    npm i react-moon

    DownloadsWeekly Downloads

    39

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    24.2 kB

    Total Files

    6

    Last publish

    Collaborators

    • dalbinaco