Components renaming (#225)
* refactor: eslint config adjusted for better diff's * refactor: stricter linting + dependencies updated * refactoring: paragraph component - component - docs * refactoring: heading component - component - docs * Update docs/components/heading.md Co-authored-by: Ilya Artamonov <ilya.sosidka@gmail.com> * refactoring: link component - component - docs * refactoring: image component - component - docs * refactoring: alert component - component - docs * refactoring: avatar component - component - docs * refactoring: removed unnecessary code - component names come from the file name * refactoring: breadcrumb component - component - docs * refactoring: accordion component - component - docs * refactoring: buttom component - component - docs * refactoring: badge component - component - docs * refactoring: card component - component - docs * refactoring: order of components in docs updated * refactoring: unnecessary semicolons removed * refactoring: button group component - component - docs * refactoring: carousel component - component - docs * refactoring: dropdown component - component - docs * refactoring: footer component - component - docs * refactoring:list-group component - component - docs * refactoring: modal component - component - docs * refactoring: navbar component - component - docs * refactoring: pagination component - component - docs * refactoring: progress component - component - docs * refactoring: rating component - component - docs * refactoring: spinner component - component - docs * refactoring: table component - component - docs * refactoring: tabs component - component - docs * feat: Updated pagination examples * lint: Lister fixes * feat: Sidebar component and some fixes * feat: Input component * feat: Some fixes * feat: Some fixes * chore: update deps * refactor: removed old Modal component * refactor: radio component and some fixes * fix: fixed path error * refactor: Range component * refactoring: timeline component - component - docs * refactor: Select component * refactoring: toast component - component - docs * refactoring: tooltip component - component - docs * refactoring: sidebar component - component - docs * refactoring: input component - component - docs * refactoring: fileInput component - component - docs * refactoring: select component - component - docs * refactoring: textarea component - component - docs * refactoring: checkbox component - component - docs * refactoring: radio component - component - docs * refactoring: toggle component - component - docs * refactoring: range component - component - docs * local configs linted * documentation quick start updated * flowbite-themable refactored to fit new linters and style guide * random linter fixes * refactoring: toast-provider component - component - docs * final linter fixes * lint: Linter fixes * fix: Fixed types * fix: Fixed card component * docs: Updated card examples * fix: Fixed tabs * refactor: Heading component refactoring * Fwb rename - few fixes after component review (#237) * fix: button documentation * fix: model type in range examples * chore: Toast marked as WIP --------- Co-authored-by: Sqrcz <naorniakowski@slashlab.pl> Co-authored-by: Sqrcz <naorniakowski@gmail.com>
This commit is contained in:
@@ -1,170 +1,120 @@
|
||||
<script setup>
|
||||
import CarouselDefaultExample from './carousel/examples/CarouselDefaultExample.vue';
|
||||
import CarouselNoControlsExample from './carousel/examples/CarouselNoControlsExample.vue';
|
||||
import CarouselNoIndicatorsExample from './carousel/examples/CarouselNoIndicatorsExample.vue';
|
||||
import CarouselSlideExample from './carousel/examples/CarouselSlideExample.vue';
|
||||
import CarouselSlideIntervalExample from './carousel/examples/CarouselSlideIntervalExample.vue';
|
||||
import CarouselPicturesExample from './carousel/examples/CarouselPicturesExample.vue';
|
||||
import FwbCarouselExample from './carousel/examples/FwbCarouselExample.vue'
|
||||
import FwbCarouselExamplePictures from './carousel/examples/FwbCarouselExamplePictures.vue'
|
||||
import FwbCarouselExampleSlide from './carousel/examples/FwbCarouselExampleSlide.vue'
|
||||
import FwbCarouselExampleSlideInterval from './carousel/examples/FwbCarouselExampleSlideInterval.vue'
|
||||
import FwbCarouselExampleWithoutControls from './carousel/examples/FwbCarouselExampleWithoutControls.vue'
|
||||
import FwbCarouselExampleWithoutIndicators from './carousel/examples/FwbCarouselExampleWithoutIndicators.vue'
|
||||
</script>
|
||||
# Vue Carousel - Flowbite
|
||||
|
||||
Use the carousel component to slide through multiple elements and images using custom controls, indicators, intervals, and options
|
||||
|
||||
## Default slider
|
||||
## Basic Carousel
|
||||
|
||||
<fwb-carousel-example />
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
</script>
|
||||
<template>
|
||||
<Carousel></Carousel>
|
||||
<fwb-carousel :pictures="pictures" />
|
||||
</template>
|
||||
```
|
||||
|
||||
<CarouselDefaultExample />
|
||||
|
||||
## Prop - controls
|
||||
|
||||
```typescript
|
||||
const props = defineProps({
|
||||
controls: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<CarouselNoControlsExample />
|
||||
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
</script>
|
||||
<template>
|
||||
<Carousel :controls="false"></Carousel>
|
||||
</template>
|
||||
```
|
||||
## Prop - indicators
|
||||
import { FwbCarousel } from 'flowbite-vue'
|
||||
|
||||
```typescript
|
||||
const props = defineProps({
|
||||
indicators: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<CarouselNoIndicatorsExample />
|
||||
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
</script>
|
||||
<template>
|
||||
<Carousel :indicators="false"></Carousel>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Prop - slide
|
||||
|
||||
```typescript
|
||||
const props = defineProps({
|
||||
slide: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<CarouselSlideExample />
|
||||
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
</script>
|
||||
<template>
|
||||
<Carousel :slide="true"></Carousel>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Prop - slide interval
|
||||
|
||||
```typescript
|
||||
const props = defineProps({
|
||||
slideInterval: {
|
||||
type: Number,
|
||||
default: 3000,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<CarouselSlideIntervalExample />
|
||||
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
</script>
|
||||
<template>
|
||||
<Carousel :slide="true" :slide-interval="1000"></Carousel>
|
||||
</template>
|
||||
```
|
||||
|
||||
## Prop - pictures
|
||||
|
||||
```typescript
|
||||
const props = defineProps({
|
||||
pictures: {
|
||||
type: Array,
|
||||
default() {
|
||||
return [
|
||||
{
|
||||
'src': 'https://flowbite.com/docs/images/carousel/carousel-1.svg',
|
||||
'alt': 'Picture 1',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.com/docs/images/carousel/carousel-2.svg',
|
||||
'alt': 'Picture 2',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.com/docs/images/carousel/carousel-3.svg',
|
||||
'alt': 'Picture 3',
|
||||
},
|
||||
]
|
||||
},
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
<CarouselPicturesExample />
|
||||
|
||||
```vue
|
||||
<script setup>
|
||||
import { Carousel } from 'flowbite-vue'
|
||||
const pictures = [
|
||||
{
|
||||
'src': 'https://flowbite.s3.amazonaws.com/docs/gallery/featured/image.jpg',
|
||||
'alt': 'Picture 1',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.s3.amazonaws.com/docs/gallery/square/image-1.jpg',
|
||||
'alt': 'Picture 2',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.s3.amazonaws.com/docs/gallery/square/image-2.jpg',
|
||||
'alt': 'Picture 3',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.s3.amazonaws.com/docs/gallery/square/image-3.jpg',
|
||||
'alt': 'Picture 4',
|
||||
},
|
||||
{
|
||||
'src': 'https://flowbite.s3.amazonaws.com/docs/gallery/square/image-5.jpg',
|
||||
'alt': 'Picture 5',
|
||||
},
|
||||
{src: '/images/img-1.svg', alt: 'Image 1'},
|
||||
{src: '/images/img-2.svg', alt: 'Image 2'},
|
||||
{src: '/images/img-3.svg', alt: 'Image 3'},
|
||||
]
|
||||
</script>
|
||||
<template>
|
||||
<Carousel :pictures="pictures"></Carousel>
|
||||
</template>
|
||||
```
|
||||
|
||||
|
||||
## Carousel without controls
|
||||
|
||||
<fwb-carousel-example-without-controls />
|
||||
```vue
|
||||
<template>
|
||||
<fwb-carousel no-controls :pictures="pictures" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { FwbCarousel } from 'flowbite-vue'
|
||||
|
||||
const pictures = [
|
||||
{src: '/images/img-1.svg', alt: 'Image 1'},
|
||||
{src: '/images/img-2.svg', alt: 'Image 2'},
|
||||
{src: '/images/img-3.svg', alt: 'Image 3'},
|
||||
]
|
||||
</script>
|
||||
```
|
||||
## Carousel without indicators
|
||||
|
||||
<fwb-carousel-example-without-indicators />
|
||||
```vue
|
||||
<template>
|
||||
<fwb-carousel no-indicators :pictures="pictures" />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { FwbCarousel } from 'flowbite-vue'
|
||||
|
||||
const pictures = [
|
||||
{src: '/images/img-1.svg', alt: 'Image 1'},
|
||||
{src: '/images/img-2.svg', alt: 'Image 2'},
|
||||
{src: '/images/img-3.svg', alt: 'Image 3'},
|
||||
]
|
||||
</script>
|
||||
```
|
||||
|
||||
## Carousel with slide animation
|
||||
|
||||
<fwb-carousel-example-slide />
|
||||
```vue
|
||||
<template>
|
||||
<fwb-carousel :pictures="pictures" slide />
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { FwbCarousel } from 'flowbite-vue'
|
||||
|
||||
const pictures = [
|
||||
{src: '/images/img-1.svg', alt: 'Image 1'},
|
||||
{src: '/images/img-2.svg', alt: 'Image 2'},
|
||||
{src: '/images/img-3.svg', alt: 'Image 3'},
|
||||
]
|
||||
</script>
|
||||
```
|
||||
|
||||
## Carousel with slide and custom interval
|
||||
|
||||
<fwb-carousel-example-slide-interval />
|
||||
|
||||
```vue
|
||||
<template>
|
||||
<fwb-carousel :pictures="pictures" slide :slide-interval="1000"/>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { FwbCarousel } from 'flowbite-vue'
|
||||
|
||||
const pictures = [
|
||||
{src: '/images/img-1.svg', alt: 'Image 1'},
|
||||
{src: '/images/img-2.svg', alt: 'Image 2'},
|
||||
{src: '/images/img-3.svg', alt: 'Image 3'},
|
||||
]
|
||||
</script>
|
||||
```
|
||||
|
||||
## Carousel API
|
||||
|
||||
### Props
|
||||
|
||||
| Name | Type | Values | Default |
|
||||
|---------------|---------|--------------------------------|---------|
|
||||
| animation | Boolean | `true`, `false` | `false` |
|
||||
| noControls | Boolean | `true`, `false` | `false` |
|
||||
| noIndicators | Boolean | `true`, `false` | `false` |
|
||||
| pictures | Array | `[{source: '', alt: ''}, ...]` | `[]` |
|
||||
| slide | Boolean | `true`, `false` | `false` |
|
||||
| slideInterval | Number | | `3000` |
|
||||
|
||||
Reference in New Issue
Block a user