انتقل إلى المحتوى
TopClass UI

بطاقة

سطح لمحتوى يجمعه موضوع واحد، باستدارة أكبر من استدارة عنصر التحكم كي لا تبدو البطاقة زرًا أبدًا.

server - 0 KB

بطاقة

server - 0 KB

سطح لمحتوى يجمعه موضوع واحد، باستدارة أكبر من استدارة عنصر التحكم كي لا تبدو البطاقة زرًا أبدًا.

تثبيت

Storage

You have used 18 GB of the 50 GB in your plan.

الشيفرة

card.tsx
import { CardBody, CardHeader, CardRoot } from 'topclassui/card'

/** The first drawing: a title and a line of text, with nothing to press. */
export default function Demo() {
  return (
    <div className="max-w-xs">
      <CardRoot>
        <CardHeader>
          <h2>Storage</h2>
        </CardHeader>
        <CardBody>You have used 18 GB of the 50 GB in your plan.</CardBody>
      </CardRoot>
    </div>
  )
}

تحدد البطاقة خط عنوانها وتترك لك مستوى العنوان: ضع h2 أو h3 داخل CardHeader.

كل الحالات، بدون تمرير الفأرة

3 حالات

Storage

You have used 18 GB of the 50 GB in your plan.
Idle

Version 0.4

Card is now CardRoot. Find and replace; nothing else changed.
With actions
Loading

أو استورده من الحزمة

topclassui/card
import { CardRoot, CardHeader, CardBody, CardFooter, CardSkeleton } from 'topclassui/card'

ثبّت مرة واحدة:npm i topclassui@beta zod

أمثلة

  • كل جزء مُصدَّر باسم مستقل: CardRoot وCardHeader وCardBody وCardFooter وCardSkeleton. لا يوجد Card.
  • البطاقة نفسها ليست تفاعلية؛ ما يمكن للمستخدم فعله يوضع في CardFooter على شكل Button، في صف يلتف حين تضيق البطاقة.
  • CardBody عنصر كتلي، فباعد بين الفقرات المتعددة بنفسك، مثلًا بـ space-y-2.
  • تأخذ البطاقة عرض حاويتها: في الشبكة تملأ كل بطاقة خليتها وارتفاع صفها.
  • CardSkeleton يحجز العرض كاملًا بنسبة 5:2 أثناء تحميل البيانات؛ مرّر الارتفاع الحقيقي في className.
basic

Storage

You have used 18 GB of the 50 GB in your plan.
with-actions

Version 0.4

Card is now CardRoot. Find and replace; nothing else changed.
report

Monthly report

Revenue rose 12% against April, driven by renewals.
paragraphs

Before you migrate

Export your projects first. The archive keeps every file and its history.

Invitations that are still pending do not move, so send them again afterwards.

grid

Starter

One project and 5 GB of storage.

Team

Ten projects, 50 GB of storage and a shared library for the whole team.

Business

Unlimited projects and single sign-on.
skeleton

Storage

You have used 18 GB of the 50 GB in your plan.
بالعربية، من اليمين إلى اليسار

التقرير الشهري

ارتفعت الإيرادات 12% مقارنة بشهر أبريل، بفضل التجديدات.

الخصائص

CardRoot

خصائص CardRoot
الخاصيةالنوعالافتراضيالحدودالوصف
childrenReactNode--The parts, in order: CardHeader, CardBody and CardFooter. Each one is optional.

CardHeader

خصائص CardHeader
الخاصيةالنوعالافتراضيالحدودالوصف
childrenReactNode--The title, in the heading element the page outline needs.

CardBody

خصائص CardBody
الخاصيةالنوعالافتراضيالحدودالوصف
childrenReactNode--The text. Several paragraphs are spaced by the caller.

CardFooter

خصائص CardFooter
الخاصيةالنوعالافتراضيالحدودالوصف
childrenReactNode--The actions, in a row that wraps when the card is narrow.

CardSkeleton

لا خصائص خاصة به: يأخذ سمات العنصر الذي يعرضه.

لوحة المفاتيح وإمكانية الوصول

لا شيء يُشغَّل: ليس تفاعليًا بمفرده.

  • تُعرض البطاقة عناصر div عادية بلا دور: ما تحتويه هو ما يمنحها المعنى.
  • اختر مستوى العنوان الذي يحتاجه مخطط الصفحة؛ CardHeader ينسّق أي عنوان تضعه فيه.
  • CardSkeleton مخفي عن التقنيات المساعدة، فعلِّم المنطقة التي تُحمَّل نفسها، مثلًا بـ aria-busy.

من اليمين إلى اليسار

تبدأ أزرار التذييل من بداية السطر، فيقع أولها في العربية على اليمين؛ ويُحاذى النص إلى البداية.

الخادم والمتصفح

يُعرض على الخادم ولا يرسل أي JavaScript.

الملفات: index.tsx.

على الشارة: server - 0 KB.