Skip to content

Feature Request: Please add maskImage #127

@budaesandrei

Description

@budaesandrei

I've read through the documentation and have only been able to find the gradient: boolean, gradientColor: string and gradientWidth props. This works well if the background is of a color that you can apply on gradientColor. However, if your background is more dynamic (ex. image or gradient), then the gradientColor will not work as expected. I was able to achieve the fade-in fade-out effects by using a maskImage style like so

<Marquee
  style={{  
    display: "flex",
    width: "90%",
    height: "70%",
    overflowX: "clip",
    maskImage: "linear-gradient(to right, transparent 0%, white 15%, white 85%, transparent 100%)", // maskImage instead of background on ::before and ::after
    position: "absolute",
  }}
  pauseOnHover
  pauseOnClick
>
   {imageList}
</Marquee>

It would be nice to integrate this as a prop somehow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions