Skip to Content
DataCards 2.2.4 is released 🎉
DocumentationCardsCommon parameters

Common parameters

The following parameters are common to all cards:

NameRequiredDescription
typeYesThe type of card, e.g. number or intSlider.
logic_view_sizeYesSize of the card in the logic view, e.g. (2,1).
labelNoText to be displayed at the top of the card.
layoutNoSize and position of the card in one or more decks, e.g. [{"size": (4,3), "position": (1,7), "deck": "default-deck"}].
datacards.publish.card( type='number', value=42, label='Number', logic_view_size=(2,1) layout=[{"size": (4,3), "position": (1,7), "deck": "default-deck"}], )

In the above example, the published card is:

  • 4 grid squares wide by 3 grid squares tall,
  • positioned 1 grid square from the left and 7 grid squares from the top,
  • published to the default deck.

Input cards

All input cards take the following extra parameters:

NameRequiredDescription
variable_keyYesThe name of the DataCards variable with which an input is connected, e.g. "my_integer_slider".
datacards.publish.card( type='toggle', label='Toggle', logic_view_size=(2,1), layout=[{"size": (4,3), "position": (1,7), "deck": "default-deck"}], variable_key="my_toggle_input" )
Last updated on