How to use react-smooth - 3 common examples

To help you get started, we’ve selected a few react-smooth examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github recharts / react-smooth / demo / Pendulum / app.js View on Github external
const style = {
    width: 2 * r,
    height: 2 * r,
    borderRadius: r,
    transform: translate,
    WebkitTransform: translate,
    background: `radial-gradient(circle at ${r * 2 / 3}px ${r * 2 / 3}px,#5cabff,#000)`,
    position: 'absolute',
    top: 0,
    left: 0,
  };

  return (
    <div style="{translateStyle(style)}">
  );
}
</div>
github recharts / recharts / src / component / Tooltip.tsx View on Github external
tooltipDimension: boxWidth,
          viewBoxDimension: viewBox.width,
        });

        translateY = this.getTranslate({
          key: 'y',
          tooltipDimension: boxHeight,
          viewBoxDimension: viewBox.height,
        });
      } else {
        outerStyle.visibility = 'hidden';
      }
    }

    outerStyle = {
      ...translateStyle({
        transform: this.props.useTranslate3d ? `translate3d(${translateX}px, ${translateY}px, 0)` : `translate(${translateX}px, ${translateY}px)`,
      }),
      ...outerStyle,
    };

    if (isAnimationActive && active) {
      outerStyle = {
        ...translateStyle({
          transition: `transform ${animationDuration}ms ${animationEasing}`,
        }),
        ...outerStyle,
      };
    }

    const cls = classNames(CLS_PREFIX, {
      [`${CLS_PREFIX}-right`]: isNumber(translateX) && coordinate && isNumber(coordinate.x) && translateX >= coordinate.x,
github recharts / react-smooth / demo / Pendulum / app.js View on Github external
return (
    <svg version="1.1" viewBox="{`0" height="{ropeLength" width="{ropeLength">
      <line style="{translateStyle({" stroke="black" y2="{y2}" x2="{x2}" y1="0" x1="{x1}"></line>
    </svg>
  );
}

react-smooth

react animation library

MIT
Latest version published 29 days ago

Package Health Score

89 / 100
Full package analysis

Popular react-smooth functions