์๊ณ ๋ฆฌ์ฆ ๋๋ฌธ์ ๊ฐ๋ฐ์ ํ๋ธ ๋ณด๋ค๊ฐ swiper๊ฐ ๋จ๊ธธ๋ ๋ดค๋๋ฐ, ์ฌ๋ฏธ์์ด๋ณด์ด๊ธธ๋ ํฌํธํด๋ฆฌ์ค๋ฅผ ๋ง๋๋ ์ค์ด๋ค
์ฌ์ฉํด๋ณด๋ค๊ฐ ์ ํํจ๊ณผ (effect)์ ์ข ๋ฅ๋ณ๋ก ๋ญ๊ฐ ๋ค๋ฅธ๊ฑด์ง ๊ถ๊ธํ๋๋ฐ,
ํ๋ฒ์ ๋ค ๋น๊ตํด๋์ ๊ธ์ด ์๊ธธ๋ ๊ทธ๋ฅ ๋ด๊ฐ ํ๋์ฉ ํด๋ดค๋ค.
์์ธํ ๋ณด๊ณ ์ถ์ ๋ถ๋ค์ ๊ณตํ์ ๋ฐ๋ชจ๋ฅผ ๋ณด์ ๋ ๋๋ค
https://swiperjs.com/demos#effect-fade
Swiper Demos
Swiper is the most modern free mobile touch slider with hardware accelerated transitions and amazing native behavior.
swiperjs.com
Effect์๋ cards, coverflow, creative, cube, fade, flip ์ด๋ ๊ฒ 6๊ฐ๊ฐ ์๋๋ฏ
1. cards
2. coverflow
effect: "coverflow",
coverflowEffect: {
rotate: 50,
stretch: -100,
depth: 400,
modifier: 1,
slideShadows: false,
},
3. creative
ํฌ๋ฆฌ์์ดํฐ๋ธ ์ดํํธ๋ prev, next ์์ฑ์ ๋ณ๊ฒฝํ์ฌ ์นด๋๊ฐ ์์ด๋ ํจ๊ณผ๋ฅผ ๋ง์๋๋ก ์ปค์คํ ํ ์ ์๋..
์์ ๋๊ฐ ๋์ ํจ๊ณผ์ธ ๊ฒ ๊ฐ๋ค
effect: "creative",
creativeEffect: {
prev: {
shadow: true,
translate: ["-125%", 0, -800],
rotate: [0, 0, -90],
},
next: {
shadow: true,
translate: ["125%", 0, -800],
rotate: [0, 0, 90],
},
},
4. cube
์ด๊ฑด ๋๋น ์กฐ์ ์ ์คํจํด์.. ๊ณต์ ํํ์ด์ง๋ฅผ ์ฐธ๊ณ ๋ฐ๋๋ค.
๊ทธ๋ฅ ๋ง ๊ทธ๋๋ก ์ฃผ์ฌ์ ๋ชจ์์ ํ๋ธ๋ฅผ ๊ตด๋ฆฌ๋ ๋๋์ ์ ์ฒด๊ฐ์๋ ์ดํํธ์ด๋ค.
https://codesandbox.io/p/sandbox/s512ge?file=%2Fsrc%2FApp.jsx%3A1%2C1
swiper-react-effect-cube
CodeSandbox is an online editor tailored for web applications.
codesandbox.io
5. flilp
์ฌ๋ผ์ด๋์ ์๋ค๋ฅผ ๋ค์ง๋ ๋๋์ ํจ๊ณผ์ด๋ค.
์์ฃผ ์ฌ์ฉ๋์ง ์์ ๊ฒ ๊ฐ๋ค
https://codesandbox.io/p/sandbox/wyqbl8?file=%2Fsrc%2FApp.jsx%3A1%2C1
swiper-react-effect-flip
CodeSandbox is an online editor tailored for web applications.
codesandbox.io
6. fade
๊ทธ๋ฅ ๋ค์ ์ฌ๋ผ์ด๋๋ก ๋ถ๋๋ฝ๊ฒ ๋์ด๊ฐ๋ ๋๋์ ํจ๊ณผ์ด๋ค.
๊ฐ์ฅ ์ผ๋ฐ์ ์ผ๋ก ์ฌ์ฉํ ์ ์์๋ฏ!
https://codesandbox.io/p/sandbox/owknx2?file=%2Fsrc%2FApp.jsx%3A1%2C1
swiper-react-effect-fade
CodeSandbox is an online editor tailored for web applications.
codesandbox.io