react-spring#Trail JavaScript Examples
The following examples show how to use
react-spring#Trail.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ProductsList.js From web with MIT License | 6 votes |
render() {
const { title, products } = this.props;
const { isOpen } = this.state;
const keys = products.map(item => item.node.id);
return (
<Container className="container">
<section className="section">
<Heading>{title}</Heading>
<div className="columns is-multiline">
<Trail
native
from={{ opacity: 0 }}
to={{ opacity: isOpen ? 1 : 0.25 }}
keys={keys}
>
{products.map(({ node }) => styles => (
<ProductItem key={node.id} item={node} styles={styles} />
))}
</Trail>
</div>
</section>
</Container>
);
}