-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #91 from qwikerx/feat/carousel
Feat/carousel
- Loading branch information
Showing
20 changed files
with
771 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { component$ } from '@builder.io/qwik' | ||
import { ComponentDocPage } from '~/components/ComponentDocPage/ComponentDocPage' | ||
import { DocumentHead } from '@builder.io/qwik-city' | ||
|
||
export default component$(() => { | ||
return ( | ||
<ComponentDocPage name="carousel"> | ||
<div q:slot="explanation"> | ||
Use the responsive carousel component to allow users to slide through multiple items and navigate between them using the control buttons and | ||
indicators. Choose from multiple examples and options to update the intervals, make the carousel static and set custom control button and | ||
indicator by configuring React and the utility classes from Tailwind CSS. | ||
</div> | ||
</ComponentDocPage> | ||
) | ||
}) | ||
|
||
export const head: DocumentHead = () => ({ | ||
title: 'Qwik Carousel - Flowbite', | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
apps/web/src/routes/examples/[theme-rtl]/carousel/01-default-carousel/index@examples.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* title: Default carousel | ||
* description: Use this example by adding a series of images inside the <Carousel> component. | ||
* height: 300 | ||
*/ | ||
|
||
import { component$ } from '@builder.io/qwik' | ||
import { StaticGenerateHandler } from '@builder.io/qwik-city' | ||
import { Carousel, CarouselSlice } from 'flowbite-qwik' | ||
import { staticGenerateHandler } from '~/routes/examples/[theme-rtl]/layout' | ||
|
||
export default component$(() => { | ||
return ( | ||
<div class="h-56 sm:h-64 xl:h-80 2xl:h-96"> | ||
<Carousel> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-1.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-2.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-3.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-4.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-5.svg" alt="..." /> | ||
</CarouselSlice> | ||
</Carousel> | ||
</div> | ||
) | ||
}) | ||
|
||
export const onStaticGenerate: StaticGenerateHandler = async () => { | ||
return staticGenerateHandler() | ||
} |
38 changes: 38 additions & 0 deletions
38
apps/web/src/routes/examples/[theme-rtl]/carousel/02-slider-content/index@examples.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* title: Slider content | ||
* description: Instead of images you can also use any type of markup and content inside the carousel such as simple text. | ||
* height: 300 | ||
*/ | ||
|
||
import { component$ } from '@builder.io/qwik' | ||
import { StaticGenerateHandler } from '@builder.io/qwik-city' | ||
import { Carousel, CarouselSlice } from 'flowbite-qwik' | ||
import { staticGenerateHandler } from '~/routes/examples/[theme-rtl]/layout' | ||
|
||
export default component$(() => { | ||
return ( | ||
<div class="h-56 sm:h-64 xl:h-80 2xl:h-96"> | ||
<Carousel> | ||
<CarouselSlice> | ||
<div class="flex h-full items-center justify-center bg-gray-400 dark:bg-gray-700 dark:text-white">Slide 1</div> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<div class="flex h-full items-center justify-center bg-gray-400 dark:bg-gray-700 dark:text-white">Slide 2</div> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<div class="flex h-full items-center justify-center bg-gray-400 dark:bg-gray-700 dark:text-white">Slide 3</div> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<div class="flex h-full items-center justify-center bg-gray-400 dark:bg-gray-700 dark:text-white">Slide 4</div> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<div class="flex h-full items-center justify-center bg-gray-400 dark:bg-gray-700 dark:text-white">Slide 5</div> | ||
</CarouselSlice> | ||
</Carousel> | ||
</div> | ||
) | ||
}) | ||
|
||
export const onStaticGenerate: StaticGenerateHandler = async () => { | ||
return staticGenerateHandler() | ||
} |
38 changes: 38 additions & 0 deletions
38
apps/web/src/routes/examples/[theme-rtl]/carousel/03-static-carousel/index@examples.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* title: Static carousel | ||
* description: Pass the slideAuto prop to false to the carousel component to make it static and disable the automatic sliding functionality. This does not disable the control or indicator buttons. | ||
* height: 300 | ||
*/ | ||
|
||
import { component$ } from '@builder.io/qwik' | ||
import { StaticGenerateHandler } from '@builder.io/qwik-city' | ||
import { Carousel, CarouselSlice } from 'flowbite-qwik' | ||
import { staticGenerateHandler } from '~/routes/examples/[theme-rtl]/layout' | ||
|
||
export default component$(() => { | ||
return ( | ||
<div class="h-56 sm:h-64 xl:h-80 2xl:h-96"> | ||
<Carousel slideAuto={false}> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-1.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-2.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-3.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-4.svg" alt="..." /> | ||
</CarouselSlice> | ||
<CarouselSlice> | ||
<img src="https://flowbite.com/docs/images/carousel/carousel-5.svg" alt="..." /> | ||
</CarouselSlice> | ||
</Carousel> | ||
</div> | ||
) | ||
}) | ||
|
||
export const onStaticGenerate: StaticGenerateHandler = async () => { | ||
return staticGenerateHandler() | ||
} |
Oops, something went wrong.