0.0.10 • Published 3 years ago

@arekjaar/link-preview v0.0.10

Weekly downloads
-
License
-
Repository
github
Last release
3 years ago

LinkPreview

Link previewer reading the Open Graph tags

Demo

https://test-link-preview.herokuapp.com/

Installation

Install link-preview with npm

  npm i --save @arekjaar/link-preview

Screenshots

App Screenshot App Screenshot

Features

  • Configurable background color [background]
  • Configurable font color [fontColor]
  • Configurable preview size [size]
  • Fixed url [fixUrl]
  • Dynamic url [url]
  • Theming: rectangle-image-left, rectangle-image-right, square-image-up, square-image-down, square-image-center

Usage/Examples

app.module.ts

import { LinkPreviewModule } from '@arekjaar/link-preview';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    LinkPreviewModule,
    HttpClientModule
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

app.component.html

<div [style.padding]='"10px"'>
<link-preview [url]='url1' [type]='"rectangle-image-right"' [fixUrl]='"https://freecons.herokuapp.com/"' [size]=400 [fontColor]='"white"' [background]='"black"'></link-preview>
<mat-form-field class="example-full-width" appearance="fill">
  <mat-label>Set url and click out</mat-label>
  <input matInput (change)='setUrl1($event)'>
</mat-form-field>
</div>

app.component.ts

public url1: Subject<string> = new Subject();

setUrl1(event: any){
      if (event.target.value !== '') {
      this.url1.next(event.target.value);
      }
    }

Hi, Do you want to collaborate by inviting me to a coffee? 👋

buymeacoffee

0.0.10

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago