Shards React
Shards React

Shards React

Documentation

Fade

The Fade component allows you to easily fade in and out content and is powered by react-transition-group.

Basic Example

Etiam semper convallis tortor, in euismod orci vehicula sit amet.
import React from "react";
import { Fade, Button } from "shards-react";

export default class BasicFadeExample extends React.Component {
  constructor(props) {
    super(props);
    this.toggle = this.toggle.bind(this);
    this.state = {
      visible: true
    };
  }

  toggle() {
    this.setState({
      visible: !this.state.visible
    });
  }

  render() {
    return (
      <div>
        <Button onClick={this.toggle} className="mb-2">
          Toggle Fade
        </Button>
        <Fade in={this.state.visible}>
          Etiam semper convallis tortor, in euismod orci vehicula sit amet.
        </Fade>
      </div>
    );
  }
}

Props

The following props are available for the Fade component.

PropDescriptionTypeDefaultRequired
tag-StringFunc"div"No
baseClass-String"fade"No
baseClassActive-String"show"No
className-String-No
innerRef-ObjectStringFunc-No
children-Array[Node]Node-No
timeout--TIMEOUT.FADENo
appear--trueNo
enter--trueNo
exit--trueNo
in--trueNo