3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【Vue3】Vue3-carouselで迅速にそれっぽいUIを作る

Posted at

スクリーンショット 2022-05-15 22.32.48.png

Vue3にはVue3-carouselとうコンポーネントがあります。
これを使えば誰でも手軽にそれっぽいカルーセルを作ることができます。

インストール

npm install vue3-carousel

テンプレート

<template>
  <carousel :items-to-show="1.5">
    <slide v-for="slide in 10" :key="slide">
      {{ slide }}
    </slide>

    <template #addons>
      <navigation />
      <pagination />
    </template>
  </carousel>
</template>

<script>
// If you are using PurgeCSS, make sure to whitelist the carousel CSS classes
import 'vue3-carousel/dist/carousel.css';
import { Carousel, Slide, Pagination, Navigation } from 'vue3-carousel';

export default {
  name: 'App',
  components: {
    Carousel,
    Slide,
    Pagination,
    Navigation,
  },
};
</script>

様々なカルーセル

Wrap Around

スクリーンショット 2022-05-15 22.34.02.png

Breakpoints

スクリーンショット 2022-05-15 22.34.51.png

HiddenArrows

スクリーンショット 2022-05-15 22.35.20.png

Active Classes

スクリーンショット 2022-05-15 22.35.54.png

##参考
https://ismail9k.github.io/vue3-carousel/

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?