Card
البطاقة<article>
also calledcontent card، product card، media card، tile، teaser، preview box، كارد، كرت، بطاقة محتوى، بطاقة منتج، صندوق المحتوى، بطاقة معاينة
A card is a container that gathers everything about one entity, an article or a product, into a unit that reads on its own and repeats dozens of times across a grid. It usually holds an image, a title, a short paragraph, a metadata line, and a row of actions, and none of those parts is mandatory. A card is not a page section: a section is one division of the page structure, it appears once, and once it carries a name it joins the landmark list a screen reader offers, while a card is a repeated content unit with no business in that list. Nor is it a table row, because a row only makes sense under its column header, whereas a card carries its labels inside it and stays readable when you cut it out and paste it somewhere else. A panel is different again: a panel shows part of the current page and stays where it is, while a card stands in for a separate entity that usually has a page of its own. The practical test in review: if the box has no title of its own and no separate entity behind it, then it is a box with a border.
If you called it…
Live specimen
Interact with the demo. Every part is real and numbered.
جديد مقارنة عملية بين خطوط الواجهات العربية، وأثر كلّ خطّ على أطوال السطور وعلى زمن التحميل في الصفحات الطويلة.
اضغط أي مكان فارغ في البطاقة ليفتح العنوان
Anatomy: every part, named
Hover a row to locate it in the demo above.
Build prompt
How it behaves right-to-left
This section is ours alone.
The horizontal card
mirrorsIn a horizontal card the media sits at the logical start with the text after it, and the swap happens from DOM order alone, because the inline axis of flex and grid follows direction: the first element in source order lands on the right in Arabic without a single line of CSS, and grid-template-columns: 96px 1fr puts the media column on the right by itself. Do not add flex-direction: row-reverse under [dir="rtl"]: that is a second flip, it sends the media back to the wrong side, and it leaves the visual order disagreeing with Tab order.
Padding and corner radius
mirrorsEvery asymmetric space inside the card is written logically: padding-inline for the side padding, and margin-inline-end on the media for the gap that separates it from the text. Media that runs flush to the edge of a horizontal card is rounded on the two inline-start corners, border-start-start-radius and border-end-start-radius, so both travel with direction, while border-top-left-radius stays on the left and cuts the image on the wrong side after the flip. The coloured stripe that marks the card type is drawn with border-inline-start: 3px solid rather than border-left.
The action row
mirrorsThe primary action stands at the logical end of the row, which in Arabic is the left side of the card. Put it last in the DOM and use justify-content: flex-end on the row, or margin-inline-start: auto on the first button in the group, since flex-end measures from the end of an inline axis that already flipped with the page. Never margin-left: auto, which is physical, and do not reorder with the order property, which moves what the eye sees and leaves Tab order where it was.
The corner badge
mirrorsA badge pinned to the card corner ("New", "20% off") travels with direction, so anchor it with inset-inline-end: 8px instead of right: 8px. Do not mirror it with transform: scaleX(-1), which flips its text and its digits along with the box and leaves both readable only in a mirror. A diagonal ribbon needs one extra step, because rotate is a physical property with no sense of direction: write rotate(calc(45deg * var(--dir))) and set --dir to -1 under [dir="rtl"], or the ribbon leans the opposite way and slides off the corner.
The image itself
never mirrorsThe content of an image never mirrors. A blanket [dir="rtl"] img { transform: scaleX(-1) } flips screenshots, logos, and faces, and every word inside the picture comes out backwards. Cropping needs the same care: object-position takes a position value with no logical keyword in it, only center, left, right, top, bottom, lengths and percentages, so a thumbnail cropped with object-position: left center keeps cropping from the physical left after the flip, and you have to swap it yourself under [dir="rtl"] when the subject of the photo demands it.
In code
Each row is one framework's word for the same thing. Take the row your project speaks.
See also
Updated · 2026-08-19