ItemConsulting / details-animated

Custom component that animates <details><summary>

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Custom component for animating details/summary elements

npm version

Usage

Register the custom element with JavaScript.

import DetailsAnimated from "@itemconsulting/details-animated";

if (!window.customElements.get("details-animated")) {
  window.customElements.define("details-animated", DetailsAnimated);
}

Use the custom element to wrap a <details>/<summary.

<details-animated>
  <details>
    <summary>Open this nice animated disclosure</summary>
    
    This part here will animate in nicely!
  </details>
</details-animated>

About

Custom component that animates <details><summary>

License:MIT License


Languages

Language:TypeScript 100.0%