Skip to content

Commit d2c7ab9

Browse files
committed
Merge branch 'develop' of https://github.com/rtCamp/core-carousel into fix/playground
2 parents f2abd09 + 4161f9d commit d2c7ab9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+581
-489
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,4 @@ phpstan.neon
3636
# Build
3737
build/
3838
tsconfig.tsbuildinfo
39-
core-carousel.zip
39+
carousel-kit.zip

DEVELOPMENT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ npm run test:actions
6969
## Directory Structure
7070

7171
- `src/` - Source code for blocks (React/TypeScript/SCSS).
72-
- `inc/` - PHP classes and traits (PSR-4 `Core_Carousel`).
72+
- `inc/` - PHP classes and traits (PSR-4 `Carousel_Kit`).
7373
- `build/` - Compiled assets (generated by `npm run build`).
7474
- `docs/` - Documentation files.
7575
- `examples/` - Block patterns and examples.

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Configuration
2-
PLUGIN_SLUG := core-carousel
2+
PLUGIN_SLUG := carousel-kit
33
PLUGIN_VERSION := 1.0.0
44
BUILD_DIR := build-dist
55
ZIP_NAME := $(PLUGIN_SLUG).zip

README.md

Lines changed: 97 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Core Carousel
1+
# Carousel Kit
22

3-
![Build Status](https://github.com/rtCamp/core-carousel/actions/workflows/release.yml/badge.svg?branch=main)
4-
![Latest Release](https://img.shields.io/github/v/release/rtCamp/core-carousel)
3+
![Build Status](https://github.com/rtCamp/carousel-kit/actions/workflows/release.yml/badge.svg?branch=main)
4+
![Latest Release](https://img.shields.io/github/v/release/rtCamp/carousel-kit)
55

66
**A modular, high-performance carousel block for WordPress, powered by the Interactivity API and Embla Carousel.**
77

@@ -16,6 +16,29 @@ Easily create dynamic, accessible, and customizable carousels for any content ty
1616
- **Accessibility**: W3C-compliant roles, labels, and keyboard navigation.
1717
- **RTL Support**: Built-in support for Right-to-Left languages.
1818

19+
## Requirements
20+
21+
| Requirement | Minimum | Recommended |
22+
|-------------|---------|-------------|
23+
| WordPress | 6.5+ | 6.6+ |
24+
| PHP | 7.4+ | 8.2+ |
25+
| Gutenberg | Not required ||
26+
27+
> **Note:** The Interactivity API became stable in WordPress 6.5. This plugin works with WordPress core—no Gutenberg plugin required.
28+
29+
## Browser Support
30+
31+
Carousel Kit supports all modern browsers:
32+
33+
| Browser | Minimum Version |
34+
|---------|-----------------|
35+
| Chrome | 80+ |
36+
| Firefox | 74+ |
37+
| Safari | 14+ |
38+
| Edge | 80+ |
39+
40+
> **Note:** Internet Explorer is not supported. The plugin requires ES2020+ features (optional chaining, nullish coalescing) and CSS custom properties.
41+
1942
## Documentation
2043

2144
- **[Installation](docs/INSTALLATION.md)**: How to install via ZIP or Composer.
@@ -35,14 +58,83 @@ The plugin provides a suite of blocks that work together:
3558
4. **Carousel Controls**: Previous/Next buttons.
3659
5. **Carousel Dots**: Pagination indicators.
3760

61+
## Screenshots
62+
63+
### Editor View
64+
![Editor View](https://github.com/user-attachments/assets/3117b2d6-33be-49ea-8dee-c4ca3a637ec8)
65+
*Adding and configuring carousel blocks in the WordPress editor.*
66+
67+
### Frontend View
68+
![Frontend View](https://github.com/user-attachments/assets/32f719e5-5f20-4243-8967-4eef880519ae)
69+
*The carousel in action on the frontend.*
70+
71+
### Settings Panel
72+
![Settings Panel](https://github.com/user-attachments/assets/e0510e0b-44ba-4c56-ab15-d0ce9bd47322)
73+
74+
*Carousel configuration options in the block sidebar.*
75+
76+
## FAQ
77+
78+
### Does it work with Full Site Editing (FSE)?
79+
80+
Yes! Carousel Kit is fully compatible with Full Site Editing. You can use the carousel block in templates, template parts, and anywhere blocks are supported.
81+
82+
### Can I nest other blocks inside slides?
83+
84+
Absolutely. Each slide is a container that accepts any WordPress block—images, paragraphs, groups, columns, and even other third-party blocks.
85+
86+
### Does it support the Query Loop block?
87+
88+
Yes. Simply add a Query Loop block inside the Carousel Viewport, and each post in the loop becomes a slide automatically. No special configuration needed.
89+
90+
### Is it accessible?
91+
92+
Yes. The carousel follows W3C accessibility guidelines with proper ARIA roles, labels, and full keyboard navigation support.
93+
94+
### Can I have multiple carousels on the same page?
95+
96+
Yes. Each carousel instance maintains its own independent state.
97+
98+
## Changelog
99+
100+
### 1.0.0 (2026-02-03)
101+
102+
**Features:**
103+
- Initial release with compound block architecture
104+
- Embla Carousel integration with Interactivity API
105+
- Query Loop support for dynamic content
106+
- Autoplay with configurable delay and interaction controls
107+
- Vertical and horizontal axis support
108+
- Slides to scroll option
109+
- Example patterns: Hero, Logo Showcase, Testimonials
110+
111+
**Bug Fixes:**
112+
- Fixed gap issue for carousel items
113+
114+
See [CHANGELOG.md](CHANGELOG.md) for full release history.
115+
116+
## Roadmap
117+
118+
Planned features for upcoming releases:
119+
120+
- [ ] **Parallax transition effect** — Parallax animation effect
121+
- [ ] **Thumbnail navigation** — Visual slide previews for navigation
122+
- [ ] **Lazy loading** — Defer off-screen slide content loading
123+
- [ ] **Loop/infinite scroll** — Seamless continuous scrolling
124+
- [ ] **Progress bar indicator** — Visual autoplay progress
125+
- [ ] **Breakpoint-specific settings** — Different slides per view at different screen sizes
126+
- [ ] **Additional patterns** — More pre-built carousel patterns
127+
128+
Have a feature request? [Open an issue](https://github.com/rtCamp/carousel-kit/issues) on GitHub.
129+
38130
## Live Demo
39131

40-
[**🚀 Try the Interactive Demo in WordPress Playground**](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/rtCamp/core-carousel/main/blueprint.json)
132+
[**🚀 Try the Interactive Demo in WordPress Playground**](https://playground.wordpress.net/?blueprint-url=https://raw.githubusercontent.com/rtCamp/carousel-kit/main/blueprint.json)
41133

42134
## Contributors
43135

44136
- [Danish Shakeel](https://github.com/danish17)
45-
- [Masud Rana](https://github.com/mr-masudrana00)
137+
- [Masud Rana](https://github.com/theMasudRana)
46138

47139
## License
48140
GPL-2.0-or-later

blueprint.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"php": "8.2",
55
"wp": "latest"
66
},
7-
"landingPage": "/core-carousel",
7+
"landingPage": "/carousel-kit",
88
"steps": [
99
{
1010
"step": "installPlugin",
@@ -21,12 +21,12 @@
2121
"step": "importWxr",
2222
"file": {
2323
"resource": "url",
24-
"url": "https://raw.githubusercontent.com/rtCamp/core-carousel/main/examples/data/core-carousel.xml"
24+
"url": "https://raw.githubusercontent.com/rtCamp/carousel-kit/main/examples/data/carousel-kit.xml"
2525
}
2626
},
2727
{
2828
"step": "runPHP",
29-
"code": "<?php require_once 'wordpress/wp-load.php'; $posts = get_posts(['post_type'=>'page', 'title'=>'Core Carousel Interactive Demo']); if($posts) { update_option('show_on_front', 'page'); update_option('page_on_front', $posts[0]->ID); }"
29+
"code": "<?php require_once 'wordpress/wp-load.php'; $posts = get_posts(['post_type'=>'page', 'title'=>'Carousel Kit Interactive Demo']); if($posts) { update_option('show_on_front', 'page'); update_option('page_on_front', $posts[0]->ID); }"
3030
}
3131
]
3232
}

carousel-kit.php

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
/**
3+
* Plugin Name: Carousel Kit
4+
* Description: Carousel block using Embla and WordPress Interactivity API.
5+
* Plugin URI: https://github.com/rtCamp/carousel-kit
6+
* Requires at least: 6.5
7+
* Requires PHP: 7.4
8+
* Author: rtCamp
9+
* Author URI: https://rtcamp.com
10+
* Contributors: iamdanih17, immasud
11+
* License: GPL2
12+
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
13+
* Version: 1.0.0
14+
* Text Domain: carousel-kit
15+
*
16+
* @package carousel-kit
17+
*/
18+
19+
define( 'CAROUSEL_KIT_PATH', untrailingslashit( plugin_dir_path( __FILE__ ) ) );
20+
define( 'CAROUSEL_KIT_URL', untrailingslashit( plugin_dir_url( __FILE__ ) ) );
21+
define( 'CAROUSEL_KIT_BUILD_PATH', CAROUSEL_KIT_PATH . '/build' );
22+
define( 'CAROUSEL_KIT_BUILD_URL', CAROUSEL_KIT_URL . '/build' );
23+
24+
require_once CAROUSEL_KIT_PATH . '/vendor/autoload.php';
25+
26+
/**
27+
* Plugin loader.
28+
*/
29+
function carousel_kit_loader() {
30+
\Carousel_Kit\Plugin::get_instance();
31+
}
32+
33+
carousel_kit_loader();

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "rtcamp/core-carousel",
2+
"name": "rtcamp/carousel-kit",
33
"type": "wordpress-plugin",
44
"config": {
55
"allow-plugins": {
@@ -54,12 +54,12 @@
5454
},
5555
"autoload": {
5656
"psr-4": {
57-
"Core_Carousel\\": "inc/"
57+
"Carousel_Kit\\": "inc/"
5858
}
5959
},
6060
"autoload-dev": {
6161
"psr-4": {
62-
"Core_Carousel\\Tests\\": "tests/php/"
62+
"Carousel_Kit\\Tests\\": "tests/php/"
6363
}
6464
},
6565
"scripts": {

core-carousel.php

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/API.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
This block uses the **WordPress Interactivity API** to manage state and logic. You can consume this state in your own custom blocks to build advanced features like progress bars, slide counters, or synchronized sliders.
44

55
## Store Namespace
6-
`core-carousel/carousel`
6+
`carousel-kit/carousel`
77

88
## Context (`CarouselContext`)
99

@@ -30,7 +30,7 @@ Create a progress bar that animates while the carousel is auto-playing.
3030
**save.tsx**
3131
```jsx
3232
<div
33-
data-wp-interactive="core-carousel/carousel"
33+
data-wp-interactive="carousel-kit/carousel"
3434
data-wp-bind--key="context.timerIterationId"
3535
data-wp-bind--style="state.barDuration"
3636
data-wp-class--is-playing="context.isPlaying"
@@ -40,7 +40,7 @@ Create a progress bar that animates while the carousel is auto-playing.
4040

4141
**view.ts**
4242
```js
43-
store('core-carousel/carousel', {
43+
store('carousel-kit/carousel', {
4444
state: {
4545
get barDuration() {
4646
const { autoplay } = getContext();
@@ -64,7 +64,7 @@ Highlight slide content when active using the `callbacks.isSlideActive` helper.
6464
6565
```jsx
6666
<div
67-
data-wp-interactive="core-carousel/carousel"
67+
data-wp-interactive="carousel-kit/carousel"
6868
data-wp-class--is-active="callbacks.isSlideActive"
6969
className="my-card"
7070
>
@@ -78,8 +78,8 @@ Highlight slide content when active using the `callbacks.isSlideActive` helper.
7878
7979
### Editor Interactivity: "Find & Bind"
8080
Gutenberg's `InnerBlocks` can isolate React Contexts, causing state sync issues between parent and deeply nested children in the editor. To guarantee reliable interactivity:
81-
1. **Attach**: The Viewport component attaches the vanilla Embla instance directly to its DOM node using a Symbol key: `element[Symbol.for("core-carousel.carousel")] = embla`.
82-
2. **Find**: Child components (Controls/Dots) attempt to find the API via Context first. If missing, they traverse the DOM up to the common wrapper (`.core-carousel`) and then search for the sibling `.embla` viewport.
81+
1. **Attach**: The Viewport component attaches the vanilla Embla instance directly to its DOM node using a Symbol key: `element[Symbol.for("carousel-kit.carousel")] = embla`.
82+
2. **Find**: Child components (Controls/Dots) attempt to find the API via Context first. If missing, they traverse the DOM up to the common wrapper (`.carousel-kit`) and then search for the sibling `.embla` viewport.
8383
3. **Bind**: A retry mechanism (`setTimeout` + `useEffect`) ensures the Viewport has finished initializing before binding listeners.
8484
8585
### Dots Implementation

docs/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Core Carousel
1+
# Contributing to Carousel Kit
22

33
Thank you for your interest in contributing! We welcome all contributions, from bug reports to feature requests and code changes.
44

@@ -38,4 +38,4 @@ To create a production-ready ZIP file:
3838
make zip
3939
```
4040

41-
This will create `core-carousel.zip` in the project root, optimized for distribution (no dev dependencies).
41+
This will create `carousel-kit.zip` in the project root, optimized for distribution (no dev dependencies).

0 commit comments

Comments
 (0)