JSFiddle - React, Tailwind, and code Playground

by Chun

HTML

<div class="related-cards__slide slider__slide" data-v-9520c7de="">
    <div class="related-cards__card related-cards__card-loader" data-v-9520c7de=""></div>
</div>

CSS

*, :after, :before {
    box-sizing: border-box;
}
.related-cards__card-loader[data-v-9520c7de] {
    background-color: #fff;
    block-size: 25.125rem;
    border-radius: 0.25rem;
    inline-size: 100%;
    inline-size: 12rem;
    overflow: hidden;
    position: relative;
}
.related-cards__card-loader[data-v-9520c7de]:after {
    animation: shimmer 1.5s infinite;
    background-image: linear-gradient(90deg,hsla(0,0%,93%,0),hsla(0,0%,93%,.2) 20%,hsla(0,0%,93%,.5) 60%,hsla(0,0%,93%,0));
    content: "";
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    position: absolute;
    transform: translate(-100%);
}

@keyframes shimmer{to{transform:translate(100%)}}