CardKitDOM

CardKitDOM

Additional CardKit class used for rendering in the DOM

Constructor

new CardKitDOM()

Source:

Methods

_isValidElement(id) → {boolean}

Checks if the ID provided is valid
Parameters:
Name Type Description
id string The ID to validate
Source:
Returns:
If the ID was valid
Type
boolean

download(scale, element)

Downloads the card as an image in the browser
Parameters:
Name Type Default Description
scale number 2 The scale to output at
element object The element to use to generate the image
Source:

renderCard(id, options)

Renders just the Card as a React component to the supplied element
Parameters:
Name Type Description
id string The ID of the element to render the card into
options object Any override data (e.g. theme, layout) to use when rendering the card
Source:

renderUI(id)

Renders the built-in UI to the supplied element
Parameters:
Name Type Description
id string The ID of the element to render the UI into
Source:

rerender()

Re-renders the Card or UI
Source:

CardKitDOM

new CardKitDOM(cardkit)

Constructor takes in an instance of CardKit and stores it for later use
Parameters:
Name Type Description
cardkit CardKit An instance of CardKit
Source:

Methods

_isValidElement(id) → {boolean}

Checks if the ID provided is valid
Parameters:
Name Type Description
id string The ID to validate
Source:
Returns:
If the ID was valid
Type
boolean

download(scale, element)

Downloads the card as an image in the browser
Parameters:
Name Type Default Description
scale number 2 The scale to output at
element object The element to use to generate the image
Source:

renderCard(id, options)

Renders just the Card as a React component to the supplied element
Parameters:
Name Type Description
id string The ID of the element to render the card into
options object Any override data (e.g. theme, layout) to use when rendering the card
Source:

renderUI(id)

Renders the built-in UI to the supplied element
Parameters:
Name Type Description
id string The ID of the element to render the UI into
Source:

rerender()

Re-renders the Card or UI
Source: