UNPKG

sliderfy

Version:

A lightweight, simple, and customizable React slider.

108 lines (82 loc) 1.82 kB
.sliderfy, .sliderfy__wrapper, .sliderfy__container, .sliderfy__slide { position: relative; } .sliderfy { /* width: 100%; */ /* height: 300px; */ } .sliderfy__container { height: 100%; overflow: hidden; } .sliderfy__wrapper { z-index: 1; display: flex; justify-content: center; width: 100%; height: 100%; transition-property: transform; } .sliderfy-horizontal .sliderfy__wrapper { flex-direction: row; touch-action: pan-y; } .sliderfy-vertical .sliderfy__wrapper { flex-direction: column; touch-action: pan-x; } .sliderfy__slide { display: flex; justify-content: center; align-items: center; flex-shrink: 0; font-size: 24px; color: #ffffff; /* background-color: #eeeeee; */ } .sliderfy__slide--active { } .sliderfy__arrow { position: absolute; top: 50%; z-index: 100; transform: translateY(-50%); display: flex; justify-content: center; align-items: center; cursor: pointer; } .sliderfy__arrow--prev, .sliderfy__arrow--next { width: 44px; height: 44px; background-color: orange; background-position: 50%; background-repeat: no-repeat; } .sliderfy__arrow--prev { background-image: url(../public/images/arrow/arrow-prev.svg); } .sliderfy__arrow--next { background-image: url(../public/images/arrow/arrow-next.svg); right: 0; } .sliderfy__dots { display: flex; justify-content: center; gap: 10px; margin-top: 10px; } .sliderfy__dot { /* width: 10px; height: 10px; border-radius: 50%; */ /* background-color: #adadad; */ /* cursor: pointer; */ } .sliderfy__dot--active { /* background-color: orange; */ }