Skip to content

Yu-Gi-Oh! ​

Import YugiohCard from yugioh-card. Pass card fields in the constructor's data option or to setData().

Normal Monster

Example data ​

json
{
  "language": "sc",
  "name": "青眼白龙",
  "cardLayout": "monster",
  "monsterFrame": "normal",
  "attribute": "light",
  "level": 8,
  "monsterTypeLine": "龙族/通常",
  "atk": 3000,
  "def": 2500,
  "cardText": "以高攻击力著称的传说之龙。任何对手都能将之粉碎,其破坏力不可估量。"
}

Parameters ​

FieldTypeDefaultMeaning and values
languageenum'sc'sc Simplified Chinese, tc Traditional Chinese, jp Japanese, kr Korean, en English, astral Astral script
textStylePresetenum''Font and text layout preset. '' Language default, custom1 Custom preset 1, custom2 Custom preset 2
namestring''Card name
nameColorstring''Name color. Empty uses the default
nameTextAlignenum'left'left Left, center Centered, right Right
applyNameGradientbooleanfalseEnable the name gradient
nameGradientColor1string'#999999'Name gradient start color
nameGradientColor2string'#ffffff'Name gradient end color
cardLayoutenum'monster'monster Monster, spell Spell, trap Trap, pendulum Pendulum
attributeenum'dark'Monster Attributes include dark DARK, light LIGHT, earth EARTH, water WATER, fire FIRE, wind WIND, divine DIVINE, '' Hide the Attribute
spellTrapIconenum'''' No icon, equip Equip, field Field, quick-play Quick-Play, ritual Ritual, continuous Continuous, counter Counter
artworkstring''Artwork URL or absolute path
monsterFrameenum'normal'Monster frames include normal Normal, effect Effect, ritual Ritual, fusion Fusion, synchro Synchro, xyz Xyz, link Link, token Token
pendulumFrameenum'normal-pendulum'Pendulum frames include normal-pendulum Normal Pendulum, effect-pendulum Effect Pendulum, ritual-pendulum Ritual Pendulum, fusion-pendulum Fusion Pendulum, synchro-pendulum Synchro Pendulum, xyz-pendulum Xyz Pendulum
levelnumber0Monster Level
ranknumber0Xyz Monster Rank
pendulumScalenumber0Pendulum Scale on both sides
pendulumEffectstring''Pendulum Effect text
monsterTypeLinestring''Monster type line
showBattleStatsbooleantrueShow the divider, labels, and values for ATK / DEF or ATK / LINK
atknumber0ATK. -1 shows ? and -2 shows ∞
defnumber0DEF. -1 shows ? and -2 shows ∞
linkArrowsnumber[][]Link Arrow positions
cardTextstring''Card Text. \n starts a new segment
compressCardTextSegmentsnumber[][]Fit each selected segment on one line. Numbering starts at 1
cardTextAlignenum'justify'left Left, center Centered, right Right, justify Justified
bodyTextFontSizeScalenumber1Font size multiplier for Card Text, Pendulum Effect, and their ruby text
bodyTextStrokeWidthnumber0Stroke width for Card Text, Pendulum Effect, the monster type line, and their ruby text
cardNumberstring''Set number
passwordstring''Card password. A string preserves leading zeros
copyrightLanguageenum'''' Hide the copyright mark, sc Simplified Chinese, jp Japanese, en English
cornerMarkenum'''' No mark, laser1 Hologram pattern 1, laser2 Hologram pattern 2, laser3 Hologram pattern 3, laser4 Solid-color mark
rarityenum'''' Default finish, dt Duel Terminal Parallel, ur Ultra Rare, gr Gold Rare, hr Holographic Rare, ser Secret Rare, gser Gold Secret Rare, pser Prismatic Secret Rare
show20thAnniversaryMarkbooleanfalseShow the 20th anniversary mark
roundCornersbooleantrueRound the corners
renderScalenumber1Scale relative to native dimensions

1 through 8 map to up, upper-right, right, lower-right, down, lower-left, left, and upper-left. LINK counts unique valid directions. [1, 4, 6, 6] displays LINK-3.