--- title: Carousel Thumbnail Scrollable Navigation description: How to use thumbnails in scrollable navigation for the Carousel? type: how-to page_title: Carousel Thumbnail Scrollable Navigation slug: carousel-kb-thumbnail-scrollable-navigation position: tags: telerik,blazor,carousel,thumbnail,navigation,images ticketid: 1550292 res_type: kb --- ## Environment
Product Carousel for Blazor
## Description How to add a thumbnail scrollable navigation below the page/image in Carousel? This would be a nice addition, which would allow independent scrolling from that of the current page. It will also be clickable in the same way that the dots are to jump to the selected page. ## Solution To add a thumbnail scrollable navigation: 1. Add HTML `
` container under the `Carousel` markup. 2. Apply custom CSS with the needed styles to the container. 3. Inside the `
`, loop through all the images in `Carousel` and define them in a smaller size. 4. Optionally, use a javascript function that keeps the synchronization of the `AutomaticPageChange` and the thumbnail. ![Blazor Carousel Thumbnail Navigation](images/carousel-thumbnail-navigation.png) >caption Component ````CSHTML @inject IJSRuntime JSRuntime;
@foreach (var img in CarouselData) { Photograph }
@code { public List CarouselData { get; set; } public int PageIndex = 1; public async Task PageChangedHandler(int newPage) { PageIndex = newPage; await JSRuntime.InvokeVoidAsync("ScrollToCurrentPage", newPage); } protected override Task OnInitializedAsync() { CarouselData = Enumerable.Range(0, 13).Select(x => new CarouselModel { ImageID = x + 1, ImageUrl = $"https://demos.telerik.com/blazor-ui/images/photos/{x % 7 + 1}.jpg" }).ToList(); return base.OnInitializedAsync(); } public class CarouselModel { public int ImageID { get; set; } public string ImageUrl { get; set; } } } ````