Skip to content

Comments

[Feat]: Add Carousel Counter Block#43

Draft
theMasudRana wants to merge 1 commit intodevelopfrom
feat/carousel-counter
Draft

[Feat]: Add Carousel Counter Block#43
theMasudRana wants to merge 1 commit intodevelopfrom
feat/carousel-counter

Conversation

@theMasudRana
Copy link
Collaborator

Add Carousel Counter Block

Introduces a new carousel-kit/carousel-counter block that displays the current slide number and total slides
(e.g., "1 of 3").

Changes

  • New block: src/blocks/carousel/counter/ with edit, save, index, and styles
  • PHP registration: Added carousel/counter to block registration in Plugin.php
  • Frontend interactivity: Added getCurrentSlideNumber and getTotalSlides callbacks in view.ts
  • Types: Added CarouselCounterAttributes type export

Usage

The counter block can be inserted inside any Carousel block and automatically syncs with the carousel state via the shared Embla context.

Testing

  1. Add a Carousel block to a page
  2. Insert the "Carousel Counter" block inside the carousel
  3. Verify counter updates when navigating slides (editor and frontend)

@theMasudRana theMasudRana self-assigned this Feb 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant