question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add fadeIn property to Progress components

See original GitHub issue

React Spinkit has a nice feature:

Fades in spinners after one second

According to research by Jakob Nielsen, feedback after user operations isn’t necessary for about a second so by default, react-spinkit will fade in your spinner at one second. Nevertheless, you can configure spinner fade-in behavior with the fadeIn prop, which accepts values full (the default), half, quarter, and none for one second, a half second, a quarter second, and no fade in, respectively. For example: <Spinner fadeIn='half' />.

What do we think about adding such a fadeIn prop to CircularProgress and LinearProgress? I would say the prop could just be a boolean, or possibly a number if we want the user to be able to configure the duration.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pelotomcommented, Dec 7, 2017

FWIW, so far I’ve been doing this with overrides, which works great because I can just set it as a general policy and don’t have to worry about remembering to do it every time I use a progress component:

const progressStyle = {
  root: {
    animationName: keyframes({ // `keyframes` comes from the `typestyle` library
      '0%': { opacity: 0 },
      '50%': { opacity: 0 },
      '100%': { opacity: 1 },
    }),
    animationDuration: '1s',
  },
};

export const theme = createMuiTheme({
  overrides: {
    MuiLinearProgress: progressStyle,
    MuiCircularProgress: progressStyle,
  },
});
0reactions
mbrookescommented, Feb 2, 2018

There was a discussion on twitter this week on why you shouldn’t have a delay, but I only skimmed it on mobile, and I can’t find despite trawling the tweet history of likely suspects. Regardless, some devs want to do this, and clearly Jakob Nielsen thinks it’s a good idea, so I’ve added @pelotom’s clever solution to the docs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add fadeIn property to Progress components #9306 - GitHub
React Spinkit has a nice feature: Fades in spinners after one second According to research by Jakob Nielsen, feedback after user operations ...
Read more >
.fadeIn() | jQuery API Documentation
This function provides an opportunity to modify the Tween object to change the value of the property before it is set. progress. Type:...
Read more >
How to create fade-in effect on page load using CSS
Use animation and transition property to create a fade-in effect on page load using CSS. Method 1: Using CSS animation property: A CSS ......
Read more >
Different Versions of jQuery fadeIn() with Examples - eduCBA
Used to modify the value of any property of the tween object before it is set. NA, Function(), 1.0. Progress, It can be...
Read more >
fade in and fade out in pure javascript without jquery
You only need to add fadeOut class to the element ... for the CSS opacity property!), which resulted in the opacity getting stuck...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found