creative-commons-web-component
TypeScript icon, indicating that this package has built-in type declarations

1.0.2 • Public • Published

Creative Commons license generator as web component

Encapsulate the html code from the Creative Commons license 'Choose a license' form in a web component.

You can define your license and license metadata through the component attributes.

Use

There are two options to use the component.

Integrate it in your javascript project

npm i creative-commons-web-component

And import it in your js file:

import 'creative-commons-web-component'

Then use it in your html or js template

<cc-license [attributes?]></cc-license>

Use it directly in your page

<script src="https://unpkg.com/creative-commons-web-component/ccLicense.dist.js"></script>
<cc-license [attributes?]></cc-license>

Attributes

All attributes are optional

Attribute Type Description
license 'by' | 'by-nc' | 'by-nc-nd' | 'by-nc-sa' | 'by-nd' | 'by-sa' Choose the license (overwrites adaptations & commercial)
adaptations 'yes' | 'no' | 'share-alike' Allow adaptations of your work to be shared?
commercial Boolean Allow commercial uses of your work?
icon '88x31' | '80x15' The icon size
work-title String The title of the work you are licensing.
attribution-title String The name of the person who should receive attribution for the work. Most often, this is the author.
attribution-url String The URL to which the work should be attributed.
permissions String A URL where a user can find information about obtaining rights that are not already permitted by the CC license.
source String The URL of the work upon which this work is based or derived.
format 'audio' | 'video' | 'image' | 'text' | 'dataset' | 'interactive' Describes what kind of work is being licensed.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.2
    1
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.2
    1
  • 1.0.1
    1
  • 1.0.0
    1

Package Sidebar

Install

npm i creative-commons-web-component

Weekly Downloads

3

Version

1.0.2

License

ISC

Unpacked Size

25.2 kB

Total Files

6

Last publish

Collaborators

  • tx2z