משאבי הפרויקט
יש לבחור משאב כדי להמשיך.
מכל תוכן לכותרות, לטקסט, לקישורים ולפעולות.
import { Card } from "@gunkin/uiify";
export default function Example() {
return (
<Card as="article" className="">
<h2>Release notes</h2>
<p>A short summary of the latest product changes.</p>
<a href="#release-notes">Read the release notes</a>
</Card>
);
}@layer components {
[data-uiify-card] {
border: var(--border-width) solid var(--border);
border-radius: var(--radius-lg);
background: var(--card);
color: var(--card-foreground);
padding-block: 1rem;
padding-inline: 1rem;
}
}import { Card } from "@gunkin/uiify";
export default function Example() {
return (
<Card
as="article"
className="
grid gap-md w-max max-w-[min(28rem,calc(100vw_-_2_*_var(--space-lg)))] p-6 border border-border rounded-xl
bg-card text-card-foreground shadow-popover [&[popover]:not(:popover-open)]:hidden
motion-safe:[&[popover]]:[transition:var(--transition-presence)]
motion-safe:[&[popover]:not(:popover-open)]:opacity-0
motion-safe:[&[popover]:not(:popover-open)]:[scale:var(--presence-scale)]
motion-safe:starting:[&[popover]:popover-open]:opacity-0
motion-safe:starting:[&[popover]:popover-open]:[scale:var(--presence-scale)]
"
>
<h2>Release notes</h2>
<p>A short summary of the latest product changes.</p>
<a href="#release-notes">Read the release notes</a>
</Card>
);
}Card| מאפיין | טיפוס | ברירת מחדל | תיאור |
|---|---|---|---|
children | ReactNode | — | תוכן החלק. |
as | ElementType | "div" | האלמנט המובנה או הרכיב המשמש כשורש. |
className | string | — | המחלקה המוחלת על אלמנט השורש. |
style | CSSProperties | — | סגנונות אלמנט השורש המובנה. |
ref | Ref<HTMLElement> | — | ה-ref המועבר לאלמנט השורש המוצג. |
render | ReactElement | ((props, state) => ReactElement) | — | החלפת האלמנט המוצג תוך שימור ההתנהגות וקישורי הנגישות. |
| מקש | פעולה |
|---|
מקבץ תוכן קשור בלי להוסיף תפקיד, יעד מיקוד או התנהגות לחיצה. בחרו אלמנט סמנטי כגון article כאשר התוכן מצדיק זאת; שמרו על קישורים ופעולות עצמאיים.
data-uiify-card