GradientCollapse
is a VTEX component that hides part of the children when it is bigger than the collapseHeight
giving the user the show more or show less options. This Component can be imported and used by any VTEX app.
📢 Disclaimer: Don't fork this project, use, contribute, or open issue with your feature request.
You should follow the usage instruction in the main README.
To import it into your code:
import { GradientCollapse } from 'vtex.store-components'
You can use it in your code like a React component with the jsx tag: <GradientCollapse />
.
<GradientCollapse>
I'm a text and I will collapse if I'm bigger than my collapseHeight!
</GradientCollapse>
Prop name | Type | Description | Default Value |
---|---|---|---|
collapseHeight |
Number! |
MaxHeight of the container | - |
children |
Node |
The component to be collapsed | - |
You should follow the Styles API instruction in the main README.
Below, we describe the namespace that are defined in the GradientCollapse
.
Class name | Description | Component Source |
---|---|---|
fadeBottom |
The bottom of the collapse | index |
pointerEventsNone |
The GradientCollapse container | index |
pointerEventsAuto |
The Show Less/Show More button area | index |