diff --git a/README.md b/README.md
index a5ee396..c4ea12f 100644
--- a/README.md
+++ b/README.md
@@ -67,6 +67,9 @@ This web component uses [HTML templates](https://caniuse.com/#feat=template), th
- Example: `drawer.open = true`
- In (p)react you might need to set undefined in your JSX (since false !== undefined for html attribute existence)
- Example: ``
+- `right`
+ - Add this attribute so the drawer opens from the right instead of the left.
+ - Example: ``
### Events
diff --git a/index.html b/index.html
index 1d68897..d75c9ba 100644
--- a/index.html
+++ b/index.html
@@ -312,6 +312,11 @@
Example Customization
--side-drawer-overlay-opacity: .25;
+
+
+ <side-drawer right><side-drawer>
+
+
@@ -347,11 +352,13 @@ Example Customization
const menuButton2 = document.querySelector("#menuButton2");
const menuButton3 = document.querySelector("#menuButton3");
const menuButton4 = document.querySelector("#menuButton4");
+ const menuButton5 = document.querySelector("#menuButton5");
const drawer = document.querySelector("#drawer");
const drawer2 = document.querySelector("#drawer2");
const drawer3 = document.querySelector("#drawer3");
const drawer4 = document.querySelector("#drawer4");
+ const drawer5 = document.querySelector("#drawer5");
menuButton.addEventListener("opened", (ev) => {
drawer.open = true;
@@ -365,6 +372,9 @@ Example Customization
menuButton4.addEventListener("opened", (ev) => {
drawer4.open = true;
});
+ menuButton5.addEventListener("opened", (ev) => {
+ drawer5.open = true;
+ });
drawer.addEventListener("open", (ev) => {
menuButton.open = true;
@@ -378,6 +388,9 @@ Example Customization
drawer4.addEventListener("open", (ev) => {
menuButton4.open = true;
});
+ drawer5.addEventListener("open", (ev) => {
+ menuButton5.open = true;
+ });
drawer.addEventListener("close", (ev) => {
menuButton.open = false;
@@ -391,6 +404,9 @@ Example Customization
drawer4.addEventListener("close", (ev) => {
menuButton4.open = false;
});
+ drawer5.addEventListener("close", (ev) => {
+ menuButton5.open = false;
+ });
}