An open API service indexing awesome lists of open source software.

https://github.com/vanillawc/wc-include

A vanilla web component for including external media
https://github.com/vanillawc/wc-include

htmlelement javascript vanillajs web-components

Last synced: 8 months ago
JSON representation

A vanilla web component for including external media

Awesome Lists containing this project

README

          

<wc-include> Include HTML from an External Source


GitHub Releases
NPM Releases
Bundlephobia
Latest Status
Release Status

Discord
Published on WebComponents.org

## Installation

*Installation*
```sh
npm i @vanillawc/wc-include
```

*Import from NPM*
```html

```

*Import from CDN*
```html

```

## Demo

Try it on [WebComponents.dev](https://webcomponents.dev/edit/zNPKE4KD6k8Lz8wVfHne?sv=1&pm=1)

## Usage

**Attributes**

- shadow - if present the contents are contained in a shadowDOM

### Basic Usage

The `src` attribute imports the contents of the file into the lightDOM.

```html

```

### 'shadow' Attribute Usage

When the `shadow` attribute is specified, the imported contents will be encapsulated in a shadowDOM.

```html

```

## Contributing

See [CONTRIBUTING.md](https://github.com/vanillawc/vanillawc/blob/main/CONTRIBUTING.md)