@web-components/mirror-element@0.0.26Built and signed on GitHub ActionsBuilt and signed on GitHub Actions
Built and signed on GitHub Actions
latest
jackcarey/web-componentsWorks with
•JSR Score100%•This package works with BrowsersIt is unknown whether this package works with Cloudflare Workers, Node.js, Deno, Bun




Downloads2/wk
•Published2 months ago (0.0.26)
Copy the contents of an element elsewhere in the DOM into this component.
mirror-element
Copy the innerHTML of any other element.
- Version: 0.0.26
- License: LGPL-3.0
Using this package
Browser
- via the ESM CDN: https://esm.sh/jsr/@web-components/mirror-element
<script src="https://esm.sh/jsr/@web-components/mirror-element" type="module"></script>
Deno
deno add jsr:@web-components/mirror-element
NPM
- JSR provides NPM compatibility. You can install this package with:
npx jsr add @web-components/mirror-element
Documentation
- Open examples for mirror-element on Storybook.
Copy the innerHTML of an element from somewhere else on the DOM.
Attributes
selector: The CSS selector of the element you want to copy.strip-ids: If amirror-elementinstance has this attribute it will remove all IDs from child elements.disabled: Prevents automatic updates. Controlled updates can be done by callingrender()on each element instance.
Styling
You might want to use display:contents in your CSS so that mirror-element instances don't produce a specific box in the DOM.
Made by jackcarey.
Built and signed on
GitHub Actions
Add Package
deno add jsr:@web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";
Import directly with a jsr specifier
import * as mirror_element from "jsr:@web-components/mirror-element";
Add Package
pnpm i jsr:@web-components/mirror-element
pnpm dlx jsr add @web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";
Add Package
yarn add jsr:@web-components/mirror-element
yarn dlx jsr add @web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";
Add Package
vlt install jsr:@web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";
Add Package
npx jsr add @web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";
Add Package
bunx jsr add @web-components/mirror-element
Import symbol
import * as mirror_element from "@web-components/mirror-element";