Jump to content

Template:Card: Difference between revisions

From Swarthmore Knowledge Base
No edit summary
No edit summary
Line 6: Line 6:
"description": "The text to display inside the card.",
"description": "The text to display inside the card.",
"type": "unbalanced-wikitext",
"type": "unbalanced-wikitext",
"required": true,
"aliases": [
"aliases": [
"Content",
"Content",
Line 24: Line 23:
"success",
"success",
"danger",
"danger",
"info"
"info",
"warning"
]
]
},
},
Line 32: Line 32:
],
],
"description": "The title for the card",
"description": "The title for the card",
"type": "string"
"type": "string",
},
"required": true
"withBorder": {
"type": "boolean",
"default": "true"
},
},
"href": {
"href": {
Line 45: Line 42:
"linkTo"
"linkTo"
],
],
"type": "string"
"type": "url"
},
},
"orientation": {
"orientation": {
Line 94: Line 91:
"variant",
"variant",
"title",
"title",
"withBorder",
"href",
"href",
"orientation",
"orientation",
"icon"
"icon"
]
],
"format": "block"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>
{{#tag:react| |component=Card|withBorder={{{withBorder|true}}}|orientation={{{orientation|vertical}}}|href={{{href|}}}|icon={{{icon|}}}|variant={{{variant|default}}}|title={{{title}}}|content={{{content}}}}}
{{#tag:react| |component=Card|orientation={{{orientation|vertical}}}|href={{{href|}}}|icon={{{icon|}}}|variant={{{variant|}}}|title={{{title}}}|content={{{content|}}}}}

Revision as of 00:57, 13 May 2026

No description.

Template parameters[Edit template data]

This template prefers block formatting of parameters.

ParameterDescriptionTypeStatus
contentcontent Content Body body

The text to display inside the card.

Unbalanced wikitextoptional
variantvariant Variant type Type

The style variant of the card (e.g., warning, success, info, danger).

Suggested values
success danger info warning
Stringoptional
titletitle Title

The title for the card

Stringrequired
hrefhref link Href Link linkTo

no description

URLoptional
orientationorientation Orientation layout Layout

no description

Suggested values
horizontal vertical
Stringoptional
iconicon Icon

no description

Suggested values
academic-cap star command-line pencil gift bank-notes bolt cake calendar computer-desktop device-phone-mobile envelope-open key phone printer question-mark-circle sparkles shield-check shield-exclamation wifi video-camera variable
Stringoptional