All Projects → Astrocoders → React Image Smooth Loading

Astrocoders / React Image Smooth Loading

Licence: mit
[not maintained] Images which just flick to appear aren't cool. Images which appear smoothly with a fade like Instagram are cool

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Image Smooth Loading

Horror
😱 React HTML elements with CSS-in-JS
Stars: ✭ 78 (-7.14%)
Mutual labels:  styled-components, css-in-js
Styled Components Rhythm
Vertical Rhythm and Font Baselines with Styled Components
Stars: ✭ 76 (-9.52%)
Mutual labels:  styled-components, css-in-js
Styled Tools
Useful interpolated functions for CSS-in-JS
Stars: ✭ 761 (+805.95%)
Mutual labels:  styled-components, css-in-js
React Redux Saga Boilerplate
Starter kit with react-router, react-helmet, redux, redux-saga and styled-components
Stars: ✭ 535 (+536.9%)
Mutual labels:  styled-components, css-in-js
Styled Theming
Create themes for your app using styled-components
Stars: ✭ 1,067 (+1170.24%)
Mutual labels:  styled-components, css-in-js
Glamorous Native
React Native component styling solved💄
Stars: ✭ 566 (+573.81%)
Mutual labels:  styled-components, css-in-js
Polished
A lightweight toolset for writing styles in JavaScript ✨
Stars: ✭ 7,074 (+8321.43%)
Mutual labels:  styled-components, css-in-js
Glamorous
DEPRECATED: 💄 Maintainable CSS with React
Stars: ✭ 3,681 (+4282.14%)
Mutual labels:  styled-components, css-in-js
Postjss
Use the power of PostCSS in compiling with JSS
Stars: ✭ 40 (-52.38%)
Mutual labels:  styled-components, css-in-js
Cattous
CSS in JSX for lazy developers, built using styled-components and styled-system
Stars: ✭ 38 (-54.76%)
Mutual labels:  styled-components, css-in-js
Design System Utils
👩‍🎨 Access your design tokens with ease
Stars: ✭ 465 (+453.57%)
Mutual labels:  styled-components, css-in-js
Cabana React
A design system built especially for both Sketch and React. 💎⚛️
Stars: ✭ 58 (-30.95%)
Mutual labels:  styled-components, css-in-js
Styled Breakpoints
Simple and powerful tool for creating breakpoints in styled components and emotion. 💅
Stars: ✭ 428 (+409.52%)
Mutual labels:  styled-components, css-in-js
Design System
Priceline.com Design System
Stars: ✭ 604 (+619.05%)
Mutual labels:  styled-components, css-in-js
Twin.macro
🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (+6015.48%)
Mutual labels:  styled-components, css-in-js
Styled System
⬢ Style props for rapid UI development
Stars: ✭ 7,126 (+8383.33%)
Mutual labels:  styled-components, css-in-js
Reactackle
Open-source components library built with React and Styled-Components.
Stars: ✭ 278 (+230.95%)
Mutual labels:  styled-components, css-in-js
Css In Js Benchmarks
Stars: ✭ 360 (+328.57%)
Mutual labels:  styled-components, css-in-js
Styled Components
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅
Stars: ✭ 35,473 (+42129.76%)
Mutual labels:  styled-components, css-in-js
Atomize
library for creating atomic react components
Stars: ✭ 54 (-35.71%)
Mutual labels:  styled-components, css-in-js

ReactImg

React component for making your site images appear in a fade in. See a demo.

Install

yarn add react-image-smooth-loading

Note: styled-components and react were added as peer dependencies. If you don't have then you must install them as well.

yarn add react-image-smooth-loading styled-components react

Usage

import Img from 'react-image-smooth-loading'

// Define which placeholder to show while the image is loading
// Can be any image file.
// There's already a default one in base64, but you'd like to change ;)
Img.globalPlaceholder = '/images/placeholder.png'

export default function ImageList({ list }) {
  return (
    <div className="image-grid">
      {list.map(url => (
        <ImageItemWrapper>
          <Img src={url} />
          <p>My awesome image</p>
        </ImageItemWrapper>
      ))}
    </div>
  )
}

Remember that Img is totally responsive, which means that it will fit accordingly to the space given to it by its container.

Options

const props = {
  src: PropTypes.string.isRequired,
  placeholder: PropTypes.string, // Optional image placeholder, overrides globalPlaceholder,
  className: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
  holderClasses: PropTypes.oneOfType([PropTypes.string, PropTypes.array]),
  placeholderProps: PropTypes.object,
  onClick: PropTypes.func,
  alt: PropTypes.string,
}

<Img {...props} />
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].