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

react-tiltshift

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tiltshift

A React component for adding tiltshift effect in images

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6
increased by500%
Maintainers
1
Weekly downloads
 
Created
Source

react-tiltshift

React component to create images tiltshift.

Usage

import TiltShift from 'react-tiltshift'

<TiltShift src="../images/sf.jpg" position="38" width="600" />

You just need to pass the src prop. You can pass any attribute you'd normally pass to a img html tag. You can pass the following props to configure the effect:

  • aperture (0-100): the amount of area that is in focus. 10 would mean one tenth of the image is sharp.
  • blur (0-10): the blur radius in pixels. Something between 1 or 2 usually gives the best results.
  • direction (“horizontal”, “vertical”, or 0-360): the direction of the effect with zero at right.
  • position (0-100): defines the point of focus. 50 would be the image middle.
  • smoothness (0-100): the amount of area between complete focus and complete blur. The higher the value, the “smoother" the blur.
Demo

Before:

screen-shot-2015-05-26-at-8 39 40-am

After:

screen-shot-2015-05-26-at-8 39 12-am

Inspiration & Base

  • jQuery tiltShift.js

Keywords

FAQs

Package last updated on 27 Sep 2015

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