benjaminpalko/.opencode/skills/daisyui/components/card.md
Benjamin Palko f526f5c0aa
Some checks failed
Deploy / deploy (push) Failing after 39s
set up new workflow and migrate to .forgejo dir (#5)
Co-authored-by: Benjamin Palko <benjaminpalko@hotmail.com>
Reviewed-on: #5
2026-08-11 20:55:29 -04:00

886 B

card

Cards are used to group and display content

card docs

Class names

  • component: card
  • part: card-title, card-body, card-actions
  • style: card-border, card-dash
  • modifier: card-side, image-full
  • size: card-xs, card-sm, card-md, card-lg, card-xl

Syntax

<div class="card {MODIFIER}">
	<figure><img src="{image-url}" alt="{alt-text}" /></figure>
	<div class="card-body">
		<h2 class="card-title">{title}</h2>
		<p>{CONTENT}</p>
		<div class="card-actions">{actions}</div>
	</div>
</div>

Rules

  • {MODIFIER} is optional and can have one of the modifier class names and one of the size class names
  • <figure> and <div class="card-body"> are optional
  • can use sm:card-side for responsive layouts
  • If image is placed after card-body, the image will be placed at the bottom