npm package: @scaleflex/widget-url
Description: The Url plugin lets users import files from the Internet. Paste any URL and it’ll be added!
Latest version: 4.8.13

# @scaleflex/widget-url

[![Plugins][plugins-image]](#plugins)
[![Website][filerobot-image]][sfx-url]
[![Version][filerobot-version]][version-url]
[![Scaleflex team][made-by-image]][sfx-url]
[![License][license-image]][license-url]
[![CodeSandbox][codeSandbox-image]][codeSandbox-url]


<div align='center'>
<img title="Scaleflex Widget logo" alt="Scaleflex Widget logo" src="https://assets.scaleflex.com/Corporate+Branding/%5B2025%5D+ALL+LOGOS+%2B+ICONS/SCALEFLEX/VXP+logo/Horizontal+White/VXP+logo+WHITE.png?vh=663932" width="140"/>
</div>

The Url plugin for [Scaleflex Media Asset Widget](https://www.npmjs.com/package/@scaleflex/widget-core)
 lets users import files from the Internet. Paste any URL and it’ll be added!

## Usage

### NPM

```bash
npm install --save @scaleflex/widget-url
```

### YARN

```bash
yarn add @scaleflex/widget-url
```

then

```js
import Url from '@scaleflex/widget-url'
...
...
...
scaleflexWidget.use(Url, propertiesObject)
```

### CDN

The plugin from CDN is found inside `Scaleflex` global object `Scaleflex.Url`

```js
const url = window.ScaleflexWidget.Url
...
...
...
scaleflexWidget.use(url, propertiesObject)
```

## Plugin's styles

```js
import '@scaleflex/widget-core/dist/style.css'
import '@scaleflex/widget-url/dist/style.css'
```

or if you prefer the minified version

```js
import '@scaleflex/widget-core/dist/style.min.css'
import '@scaleflex/widget-url/dist/style.min.css'
```

> The plugin's css file should be imported after the [Core's css file](../@scaleflex/widget-core/#modules-styles) for having the styles shown correctly.

## Properties

### `title`

<u>Type:</u> `string`

<u>Default:</u> `'Link'`

The title/label that would be shown & used for the plugin.

### `companionHeaders`

<u>Type:</u> `null` | `object`

<u>Default:</u> `null`

If you need to pass additional headers for in companion requests then pass them in this property.

<!-- Variables -->

[npm-url]: https://www.npmjs.com/package/@scaleflex/widget-url
[license-url]: https://opensource.org/licenses/MIT
[sfx-url]: https://www.scaleflex.com/
[version-url]: https://www.npmjs.com/package/@scaleflex/widget-url
[codeSandbox-url]: https://codesandbox.io/p/sandbox/scalelfex-widget-v4-sandbox-dtp6l3?file=%2Fsrc%2Findex.js

[npm-image]: https://img.shields.io/npm/v/@telus/remark-config.svg?style=for-the-badge&logo=npm
[license-image]: https://img.shields.io/badge/license-MIT-blue.svg?style=for-the-badge
[made-by-image]: https://img.shields.io/badge/%3C%2F%3E%20with%20%E2%99%A5%20by-the%20Scaleflex%20team-6986fa.svg?style=for-the-badge
[plugins-image]: https://img.shields.io/static/v1?label=Scaleflex&message=Plugins&color=yellow&style=for-the-badge
[filerobot-image]: https://img.shields.io/static/v1?label=Scaleflex&message=website&color=orange&style=for-the-badge
[filerobot-version]: https://img.shields.io/npm/v/@scaleflex/widget-url?label=Version&style=for-the-badge&logo=npm
[codeSandbox-image]: https://img.shields.io/badge/CodeSandbox-black?style=for-the-badge&logo=CodeSandbox