-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into pr-line-chart-fill
- Loading branch information
Showing
102 changed files
with
3,685 additions
and
344 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
101 changes: 101 additions & 0 deletions
101
BlazorBootstrap.Demo.RCL/Components/Pages/Carousel/CarouselDocumentation.razor
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,101 @@ | ||
@page "/carousel" | ||
|
||
<PageTitle>@title</PageTitle> | ||
|
||
<MetaTags PageUrl="@pageUrl" Title="@title" Description="@description" ImageUrl="@imageUrl" /> | ||
|
||
<h1>Blazor Carousel</h1> | ||
<div class="lead mb-3">Blazor Carousel component is a slideshow component that cycles through elements, images, or slides of text.</div> | ||
|
||
<CarbonAds /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Examples" PageUrl="@pageUrl" HashTagName="examples" /> | ||
<div class="mb-3">Here is a basic example of a carousel with three slides.</div> | ||
<Demo Type="typeof(Carousel_Demo_01_Examples)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Indicators" PageUrl="@pageUrl" HashTagName="indicators" /> | ||
<div class="mb-3"> | ||
You can add indicators to the carousel, alongside the previous/next controls. | ||
The indicators allow users to jump directly to a particular slide. | ||
Set <code>ShowIndicators</code> to <code>true</code> to show the indicators. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_02_Indicators)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Captions" PageUrl="@pageUrl" HashTagName="captions" /> | ||
<div class="mb-3"> | ||
You can add captions to your slides with the <code>CarouselCaption</code> component within any <code>CarouselItem</code>. | ||
They can be easily hidden on smaller viewports. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_03_Captions)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Crossfade" PageUrl="@pageUrl" HashTagName="Crossfade" /> | ||
<div class="mb-3"> | ||
To animate slides with a fading transition instead of sliding, set <code>Crossfade</code> to <code>true</code>. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_04_Crossfade)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Autoplaying carousels" PageUrl="@pageUrl" HashTagName="autoplaying-carousels" /> | ||
<div class="mb-3"> | ||
You can make your carousels autoplay on page load by setting the <code>Autoplay</code> parameter to <code>CarouselAutoPlay.StartOnPageLoad</code>. | ||
Autoplaying carousels automatically pause while hovered with the mouse. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_05_Autoplay_A_StartOnPageLoad)" Tabs="true" /> | ||
<div class="my-3"> | ||
When the <code>Autoplay</code> parameter is set to <code>CarouselAutoPlay.StartAfterUserInteraction</code>, the carousel won’t automatically start to cycle on page load. | ||
Instead, it will only start after the first user interaction. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_05_Autoplay_B_StartAfterUserInteraction)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Individual carousel item interval" PageUrl="@pageUrl" HashTagName="individual-carousel-item-interval" /> | ||
<div class="mb-3"> | ||
Add <code>Interval</code> parameter to a <code>CarouselItem</code> component to change the amount of time to delay between automatically cycling to the next item. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_06_Individual_Carouselitem_Interval)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Autoplaying carousels without controls" PageUrl="@pageUrl" HashTagName="autoplaying-carousels-without-controls" /> | ||
<div class="mb-3"> | ||
Hide the controls by setting <code>ShowPreviousNextControls</code> parameter to <code>false</code>. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_07_Autoplaying_Carousels_without_Controls)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Disable touch swiping" PageUrl="@pageUrl" HashTagName="disable-touch-swiping" /> | ||
<div class="mb-3"> | ||
Carousels support swiping left/right on touchscreen devices to move between slides. | ||
This can be disabled by setting the <code>Touch</code> option to <code>false</code>. | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_08_Touch)" Tabs="true" /> | ||
|
||
<SectionHeading Size="HeadingSize.H2" Text="Events" PageUrl="@pageUrl" HashTagName="events" /> | ||
<div class="mb-3"> | ||
Blazor Bootstrap Carousel component exposes a two events for hooking into Carousel functionality. | ||
<table class="table"> | ||
<thead> | ||
<tr> | ||
<th scope="col">Event Name</th> | ||
<th scope="col">Description</th> | ||
</tr> | ||
</thead> | ||
<tbody class="table-group-divider"> | ||
<tr> | ||
<th scope="row"><code>Onslide</code></th> | ||
<td>Fires immediately when the slide instance method is invoked.</td> | ||
</tr> | ||
<tr> | ||
<th scope="row"><code>Onslid</code></th> | ||
<td>Fired when the carousel has completed its slide transition.</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
<Demo Type="typeof(Carousel_Demo_09_Events)" Tabs="true" /> | ||
|
||
<Callout HideHeading="true"> | ||
<b>NOTE:</b> All of the images were generated using Microsoft Designer. | ||
</Callout> | ||
|
||
@code { | ||
private string pageUrl = "/carousel"; | ||
private string title = "Blazor Carousel Component"; | ||
private string description = "Blazor Carousel component is a slideshow component that cycles through elements, images, or slides of text."; | ||
private string imageUrl = "https://i.imgur.com/YoZd9Hy.png"; | ||
} |
11 changes: 11 additions & 0 deletions
11
BlazorBootstrap.Demo.RCL/Components/Pages/Carousel/Carousel_Demo_01_Examples.razor
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,11 @@ | ||
<Carousel> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-01.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-02.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-03.png" /> | ||
</CarouselItem> | ||
</Carousel> |
11 changes: 11 additions & 0 deletions
11
BlazorBootstrap.Demo.RCL/Components/Pages/Carousel/Carousel_Demo_02_Indicators.razor
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,11 @@ | ||
<Carousel ShowIndicators="true"> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-01.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-02.png" /> | ||
</CarouselItem> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-03.png" /> | ||
</CarouselItem> | ||
</Carousel> |
23 changes: 23 additions & 0 deletions
23
BlazorBootstrap.Demo.RCL/Components/Pages/Carousel/Carousel_Demo_03_Captions.razor
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,23 @@ | ||
<Carousel ShowIndicators="true"> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-04.png" /> | ||
<CarouselCaption> | ||
<h2>Earth Day</h2> | ||
<p>Let's unite to protect our planet and create a sustainable future for generations to come.</p> | ||
</CarouselCaption> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-05.png" /> | ||
<CarouselCaption> | ||
<h2>International Yoga Day</h2> | ||
<p>Embrace the ancient art of harmony for a healthier, happier you.</p> | ||
</CarouselCaption> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-06.png" /> | ||
<CarouselCaption> | ||
<h2>World Water Day</h2> | ||
<p>Every drop counts, let's protect our planet's most precious resource.</p> | ||
</CarouselCaption> | ||
</CarouselItem> | ||
</Carousel> |
11 changes: 11 additions & 0 deletions
11
BlazorBootstrap.Demo.RCL/Components/Pages/Carousel/Carousel_Demo_04_Crossfade.razor
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,11 @@ | ||
<Carousel Crossfade="true"> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-01.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-02.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-03.png" /> | ||
</CarouselItem> | ||
</Carousel> |
11 changes: 11 additions & 0 deletions
11
...trap.Demo.RCL/Components/Pages/Carousel/Carousel_Demo_05_Autoplay_A_StartOnPageLoad.razor
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,11 @@ | ||
<Carousel Autoplay="CarouselAutoPlay.StartOnPageLoad"> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-01.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-02.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-03.png" /> | ||
</CarouselItem> | ||
</Carousel> |
11 changes: 11 additions & 0 deletions
11
...RCL/Components/Pages/Carousel/Carousel_Demo_05_Autoplay_B_StartAfterUserInteraction.razor
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,11 @@ | ||
<Carousel Autoplay="CarouselAutoPlay.StartAfterUserInteraction"> | ||
<CarouselItem Active="true"> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-01.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-02.png" /> | ||
</CarouselItem> | ||
<CarouselItem> | ||
<Image Src="_content/BlazorBootstrap.Demo.RCL/images/slide-03.png" /> | ||
</CarouselItem> | ||
</Carousel> |
Oops, something went wrong.