diff --git a/.browserslistrc b/.browserslistrc
old mode 100644
new mode 100755
diff --git a/.changeset/README.md b/.changeset/README.md
new file mode 100644
index 0000000..e5b6d8d
--- /dev/null
+++ b/.changeset/README.md
@@ -0,0 +1,8 @@
+# Changesets
+
+Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
+with multi-package repos, or single-package repos to help you version and publish your code. You can
+find the full documentation for it [in our repository](https://github.com/changesets/changesets)
+
+We have a quick list of common questions to get you started engaging with this project in
+[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
diff --git a/.changeset/config.json b/.changeset/config.json
new file mode 100644
index 0000000..dcd3d8b
--- /dev/null
+++ b/.changeset/config.json
@@ -0,0 +1,11 @@
+{
+ "$schema": "https://unpkg.com/@changesets/config@3.0.0/schema.json",
+ "changelog": "@changesets/cli/changelog",
+ "commit": false,
+ "fixed": [],
+ "linked": [],
+ "access": "public",
+ "baseBranch": "master",
+ "updateInternalDependencies": "patch",
+ "ignore": []
+}
diff --git a/.editorconfig b/.editorconfig
old mode 100644
new mode 100755
diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 0000000..1ef833d
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,29 @@
+{
+ "root": true,
+ "overrides": [
+ {
+ "files": [
+ "*.ts"
+ ],
+ "parserOptions": {
+ "project": [
+ "tsconfig.app.json"
+ ],
+ "createDefaultProgram": true
+ },
+ "extends": [
+ "plugin:@angular-eslint/recommended",
+ "plugin:@angular-eslint/template/process-inline-templates",
+ "@dndxdnd"
+ ]
+ },
+ {
+ "files": [
+ "*.html"
+ ],
+ "extends": [
+ "plugin:@angular-eslint/template/recommended"
+ ]
+ }
+ ]
+}
diff --git a/.gitignore b/.gitignore
old mode 100644
new mode 100755
diff --git a/.vscode/extensions.json b/.vscode/extensions.json
old mode 100644
new mode 100755
diff --git a/.vscode/launch.json b/.vscode/launch.json
old mode 100644
new mode 100755
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
old mode 100644
new mode 100755
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..a5152b1
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2024 Donald Mok
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/README.md b/README.md
old mode 100644
new mode 100755
index e8794e0..bef6bfa
--- a/README.md
+++ b/README.md
@@ -1,27 +1,247 @@
-# EmblaCarouselAngularMonorepo
+
-This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.2.13.
+
Embla Carousel Angular
-## Development server
+
+ An Angular wrapper for Embla Carousel.
+
-Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files.
+
-## Code scaffolding
+
Installation
-Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
+```shell
+npm i embla-carousel-angular
+```
-## Build
+
-Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory.
-## Running unit tests
+
The component structure
-Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
+Embla Carousel provides the handy `EmblaCarouselDirective` **standalone** directive for seamless integration with Angular. A minimal setup requires an **overflow wrapper** and a **scroll container**. Start by adding the following structure to your carousel:
-## Running end-to-end tests
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
-Run `ng e2e` to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+
Slide 1
+
Slide 2
+
Slide 3
+
+
+ `,
+ imports: [EmblaCarouselDirective],
+ standalone: true
+})
+export class CarouselComponent implements AfterViewInit {
+ @ViewChild(EmblaCarouselDirective) emblaRef: EmblaCarouselDirective
-## Further help
+ private emblaApi?: EmblaCarouselType
+ private options = { loop: false }
-To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
+ ngAfterViewInit() {
+ this.emblaApi = this.emblaRef.emblaApi
+ }
+}
+```
+
+
+
Styling the carousel
+
+The element with the classname `embla` is needed to cover the scroll overflow. Its child element with the `container` classname is the scroll body that scrolls the slides. Continue by adding the following **CSS** to these elements:
+
+```css
+.embla {
+ overflow: hidden;
+}
+.embla__container {
+ display: flex;
+}
+.embla__slide {
+ flex: 0 0 100%;
+ min-width: 0;
+}
+```
+
+
Accessing the carousel API
+
+The `emblaCarousel` directive takes the Embla Carousel [options](https://www.embla-carousel.com/api/options/) as part of its inputs. Additionally, you can access the [API](https://www.embla-carousel.com/api/) by using the `@ViewChild` decorator to access the carousel in `AfterViewInit` hook。
+
+> [!WARNING]
+> Calling the following embla APIs directly will trigger too much ChangeDetection, which will lead to serious performance issues.
+
+
+
+- `emblaApi.on()`
+- `emblaApi.scrollNext()`
+- `emblaApi.scrollPrev()`
+- `emblaApi.scrollTo()`
+
+Consider using the following methods which are wrapped with `ngZone.runOutsideAngular()`:
+
+- `EmblaCarouselDirective.scrollPrev()`
+- `EmblaCarouselDirective.scrollNext()`
+- `EmblaCarouselDirective.scrollTo()`
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+The `emblaCarousel` directive also provides a custom event: `emblaChange` that forwards embla events, also wrapped in `ngZone.runOutsideAngular`. You need to listen by passing the specified event names into `subscribeToEvents` input on demand.
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType,
+ EmblaEventType
+} from 'embla-carousel-angular'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+Start by installing the plugin you want to use. In this example, we're going to install the [Autoplay](https://www.embla-carousel.com/plugins/autoplay/) plugin:
+
+```shell
+npm install embla-carousel-autoplay --save
+```
+
+The `emblaCarousel` directive inputs also accepts [plugins](https://www.embla-carousel.com/plugins/). Note that plugins need to be passed in an array like so:
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
+import Autoplay from 'embla-carousel-autoplay'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+Embla Carousel provides the handy `EmblaCarouselDirective` **standalone** directive for seamless integration with Angular. A minimal setup requires an **overflow wrapper** and a **scroll container**. Start by adding the following structure to your carousel:
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+The element with the classname `embla` is needed to cover the scroll overflow. Its child element with the `container` classname is the scroll body that scrolls the slides. Continue by adding the following **CSS** to these elements:
+
+```css
+.embla {
+ overflow: hidden;
+}
+.embla__container {
+ display: flex;
+}
+.embla__slide {
+ flex: 0 0 100%;
+ min-width: 0;
+}
+```
+
+
Accessing the carousel API
+
+The `emblaCarousel` directive takes the Embla Carousel [options](https://www.embla-carousel.com/api/options/) as part of its inputs. Additionally, you can access the [API](https://www.embla-carousel.com/api/) by using the `@ViewChild` decorator to access the carousel in `AfterViewInit` hook。
+
+> [!WARNING]
+> Calling the following embla APIs directly will trigger too much ChangeDetection, which will lead to serious performance issues.
+
+
+
+- `emblaApi.on()`
+- `emblaApi.scrollNext()`
+- `emblaApi.scrollPrev()`
+- `emblaApi.scrollTo()`
+
+Consider using the following methods which are wrapped with `ngZone.runOutsideAngular()`:
+
+- `EmblaCarouselDirective.scrollPrev()`
+- `EmblaCarouselDirective.scrollNext()`
+- `EmblaCarouselDirective.scrollTo()`
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+The `emblaCarousel` directive also provides a custom event: `emblaChange` that forwards embla events, also wrapped in `ngZone.runOutsideAngular`. You need to listen by passing the specified event names into `subscribeToEvents` input on demand.
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType,
+ EmblaEventType
+} from 'embla-carousel-angular'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+
+
+Start by installing the plugin you want to use. In this example, we're going to install the [Autoplay](https://www.embla-carousel.com/plugins/autoplay/) plugin:
+
+```shell
+npm install embla-carousel-autoplay --save
+```
+
+The `emblaCarousel` directive inputs also accepts [plugins](https://www.embla-carousel.com/plugins/). Note that plugins need to be passed in an array like so:
+
+```ts
+import { AfterViewInit, Component, ViewChild } from '@angular/core'
+import {
+ EmblaCarouselDirective,
+ EmblaCarouselType
+} from 'embla-carousel-angular'
+import Autoplay from 'embla-carousel-autoplay'
+
+@Component({
+ selector: 'app-carousel',
+ template: `
+