Giter Club home page Giter Club logo

cds-card-viewer's Introduction

CDS Card Viewer

UI-Component for rendering CDS card JSON objects following the CDS Hooks specification at [https://cds-hooks.hl7.org/1.0/#card-attributes].

Install

  • Run npm install @molit/cds-card-viewer --save

Usage

Angular, React, Vue

  • Add the following to your
    • Angular: main.ts
    • React: index.js
    • Vue: main.js
import { applyPolyfills, defineCustomElements } from '@molit/cds-card-viewer/loader';

applyPolyfills().then(() => { 
    // Surrounding defineCustomElemnts() with applyPolyfills() is only needed if older browsers are targeted
    defineCustomElements();
});
  • Only in Angular: In your app.module.ts add the following
import {CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';

@NgModule({
  schemas: [CUSTOM_ELEMENTS_SCHEMA]
})
  • Then you can use the element anywhere in your template, JSX, html etc

HTML/JavaScript

Script tag

  • Add the script tag <script src="https://unpkg.com/@molit/cds-card-viewer/dist/cds-card-viewer.js"></script> to the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Node Modules

  • Run npm install @molit/cds-card-viewer --save
  • Add the script tag <script src="/node_modules/@molit/cds-card-viewer/dist/cds-card-viewer.js"></script> to the head of your index.html
  • Then you can use the element anywhere in your template, JSX, html etc

Need more information? Check out the StencilJS Framework Integration Guide.

Components

Name Description Example Example Component
cds-card Displays the given CDS card. <cds-card card='{...}'></cds-card> ๐Ÿ”—

Built with love! by MOLIT Institut gGmbH โคโค

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.