# elm-oembed

> A Custom Element and accompanying Elm package for displaying oembed content.

Latest version **0.0.6** (published 2019-09-24) · BSD-3-Clause license · 0 weekly downloads

## Install

```sh
npm install elm-oembed
pnpm add elm-oembed
yarn add elm-oembed
bun add elm-oembed
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2019-09-24 |
| First published | 2019-09-11 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Dillon Kearns |
| Maintainers | dillonkearns |

## Links

- npm: https://www.npmjs.com/package/elm-oembed
- npm.io page: https://npm.io/package/elm-oembed

## Recent versions

- 0.0.6 (latest) — 2019-09-24
- 0.0.5 — 2019-09-24
- 0.0.4 — 2019-09-23
- 0.0.3 — 2019-09-19
- 0.0.2 — 2019-09-11
- 0.0.1 — 2019-09-11

## README

# `elm-oembed`

[![Elm package](https://img.shields.io/elm-package/v/dillonkearns/elm-graphql.svg)](https://package.elm-lang.org/packages/dillonkearns/elm-graphql/latest/)
[![npm](https://img.shields.io/npm/v/@dillonkearns/elm-graphql.svg)](https://npmjs.com/package/@dillonkearns/elm-graphql)

A Web Component and accompanying Elm package for rendering [oembed content](https://oembed.com).

Width and height are sized dynamically based on the loaded content. Script tags are
safely loaded within an `iframe`.

## What is oembed

[`oembed` is a protocol](https://oembed.com), with [many providers implementing it](https://oembed.com/#section7).
It allows you to turn a URL into embeddable content.

These examples will render a YouTube player, an embedded Tweet, a Giphy `.gif` of the desired dimensions,
and an Elm code snippet in Ellie. Check out the `examples` folder to see it in action!

```elm
div []
    [ Oembed.viewOrDiscover Nothing "https://www.youtube.com/watch?v=43eM4kNbb6c"
    , Oembed.viewOrDiscover Nothing "https://twitter.com/dillontkearns/status/1105250778233491456"
    , Oembed.viewOrDiscover (Just { maxWidth = 250, maxHeight = 1000 }) "https://giphy.com/gifs/art-weird-ewan-26hiu3mZVquuykwhy"
    , Oembed.viewOrDiscover Nothing "https://ellie-app.com/4Xt4jdgtnZ2a1"
    ]
```

## Setup
Just load the Web Component like so:

```shell
npm install --save-dev elm-oembed
```

```js
import "elm-oembed";
```

---
_Source: https://npm.io/package/elm-oembed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
