React Bootstrap 5 회전식 슬라이더 만들기

오늘 튜토리얼에서는 간단한 반응 부트스트랩 5 캐러셀 슬라이더를 만들 것입니다. 먼저 반응 js에서 부트스트랩 5를 설치 및 설정해야 합니다.

Install & Setup Vite + React + Typescript + Bootstrap 5

React Bootstrap 5 회전식 슬라이더

import React from 'react';
import Carousel from 'react-bootstrap/Carousel';

export default function Home() {
  return (
    <div>
      <Carousel>
        <Carousel.Item>
          <img
            className=" w-100 img-fluid"
            src="https://cdn.pixabay.com/photo/2014/11/04/21/14/feather-517181__340.jpg"
            alt="First slide"
          />
          <Carousel.Caption>
            <h3>First slide label</h3>
            <p>Nulla vitae elit libero, a pharetra augue mollis interdum.</p>
          </Carousel.Caption>
        </Carousel.Item>
        <Carousel.Item>
          <img
            className="d-block w-100 img-fluid"
            src="https://cdn.pixabay.com/photo/2014/11/04/21/14/feather-517181__340.jpg"
            alt="Second slide"
          />

          <Carousel.Caption>
            <h3>Second slide label</h3>
            <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
          </Carousel.Caption>
        </Carousel.Item>
        <Carousel.Item>
          <img
            className="d-block w-100 img-fluid"
            src="https://cdn.pixabay.com/photo/2014/11/04/21/14/feather-517181__340.jpg"
            alt="Third slide"
          />

          <Carousel.Caption>
            <h3>Third slide label</h3>
            <p>
              Praesent commodo cursus magna, vel scelerisque nisl consectetur.
            </p>
          </Carousel.Caption>
        </Carousel.Item>
      </Carousel>
    </div>
  );
}




또한 읽기



Install NextUI in React with Typescript

좋은 웹페이지 즐겨찾기