Anatomy
The aegov-card component renders a single bordered surface with a padded content area and a default slot. Border, background, and radius all live on the outer surface; padding lives on the inner content wrapper so it can be turned off independently for edge-to-edge media.

| Item | Name | Description |
|---|---|---|
1 |
Border / surface | The outer edge — colour and thickness driven by appearance, variant, and border-width |
2 |
Content area | The inner, padded wrapper that holds the slotted content (is-padding toggles its padding) |
3 |
Slotted content | Any markup or AEGOV components placed inside — headings, text, badges, buttons |
Appearance
The appearance property controls how the border is drawn. Colour resolves from variant (default primary).
Solid
Full-strength border. The default surface.
Light
Quieter outline for grouped or supporting content.
Creative
Gradient outline for featured or promotional cards.
<aegov-card appearance="solid">
<h3 class="font-bold text-lg m-0">Solid</h3>
<p class="text-base mt-2">Full-strength border. The default surface.</p>
</aegov-card>
<aegov-card appearance="light">
<h3 class="font-bold text-lg m-0">Light</h3>
<p class="text-base mt-2">Quieter outline for grouped or supporting content.</p>
</aegov-card>
<aegov-card appearance="creative">
<h3 class="font-bold text-lg m-0">Creative</h3>
<p class="text-base mt-2">Gradient outline for featured or promotional cards.</p>
</aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardAppearance() {
return (
<>
<AegovCard appearance="solid">
<h3 className="font-bold text-lg m-0">Solid</h3>
<p className="text-base">Full-strength border. The default surface.</p>
</AegovCard>
<AegovCard appearance="light">
<h3 className="font-bold text-lg m-0">Light</h3>
<p className="text-base">Quieter outline for grouped or supporting content.</p>
</AegovCard>
<AegovCard appearance="creative">
<h3 className="font-bold text-lg m-0">Creative</h3>
<p className="text-base">Gradient outline for featured or promotional cards.</p>
</AegovCard>
</>
);
}
<template>
<aegov-card appearance="solid">
<h3 class="font-bold text-lg m-0">Solid</h3>
<p class="text-base mt-2">Full-strength border. The default surface.</p>
</aegov-card>
<aegov-card appearance="light">
<h3 class="font-bold text-lg m-0">Light</h3>
<p class="text-base mt-2">Quieter outline for grouped or supporting content.</p>
</aegov-card>
<aegov-card appearance="creative">
<h3 class="font-bold text-lg m-0">Creative</h3>
<p class="text-base mt-2">Gradient outline for featured or promotional cards.</p>
</aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-appearance',
imports: [AegovCard],
template: `
<aegov-card appearance="solid">
<h3 class="font-bold text-lg m-0">Solid</h3>
<p class="text-base mt-2">Full-strength border. The default surface.</p>
</aegov-card>
<aegov-card appearance="light">
<h3 class="font-bold text-lg m-0">Light</h3>
<p class="text-base mt-2">Quieter outline for grouped or supporting content.</p>
</aegov-card>
<aegov-card appearance="creative">
<h3 class="font-bold text-lg m-0">Creative</h3>
<p class="text-base mt-2">Gradient outline for featured or promotional cards.</p>
</aegov-card>
`,
})
export class CardAppearanceComponent {}
Variant
The variant property selects the colour family for the border, hover shift, and glow shadow. It composes with appearance to resolve the actual token.
| Variant | Solid | Light | Creative gradient |
|---|---|---|---|
primary |
primary-600 |
primary-200 |
primary-400 → primary-800 |
secondary |
secondary-600 |
secondary-200 |
secondary-400 → secondary-800 |
neutral-max |
aeblack-800 |
aeblack-400 |
aeblack-400 → aeblack-800 |
neutral-min |
aeblack-100 |
aeblack-50 |
aeblack-50 → aeblack-300 |
Primary
Secondary
Neutral-max
Neutral-min
<aegov-card variant="primary"><p class="text-sm">Primary</p></aegov-card>
<aegov-card variant="secondary"><p class="text-sm">Secondary</p></aegov-card>
<aegov-card variant="neutral-max"><p class="text-sm">Neutral-max</p></aegov-card>
<aegov-card variant="neutral-min"><p class="text-sm">Neutral-min</p></aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardVariants() {
return (
<>
<AegovCard variant="primary"><p className="text-sm">Primary</p></AegovCard>
<AegovCard variant="secondary"><p className="text-sm">Secondary</p></AegovCard>
<AegovCard variant="neutral-max"><p className="text-sm">Neutral-max</p></AegovCard>
<AegovCard variant="neutral-min"><p className="text-sm">Neutral-min</p></AegovCard>
</>
);
}
<template>
<aegov-card variant="primary"><p class="text-sm">Primary</p></aegov-card>
<aegov-card variant="secondary"><p class="text-sm">Secondary</p></aegov-card>
<aegov-card variant="neutral-max"><p class="text-sm">Neutral-max</p></aegov-card>
<aegov-card variant="neutral-min"><p class="text-sm">Neutral-min</p></aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-variants',
imports: [AegovCard],
template: `
<aegov-card variant="primary"><p class="text-sm">Primary</p></aegov-card>
<aegov-card variant="secondary"><p class="text-sm">Secondary</p></aegov-card>
<aegov-card variant="neutral-max"><p class="text-sm">Neutral-max</p></aegov-card>
<aegov-card variant="neutral-min"><p class="text-sm">Neutral-min</p></aegov-card>
`,
})
export class CardVariantsComponent {}
Border width
border-width accepts 1, 2, or 3 and controls the outline thickness in pixels for solid/light appearances. The default of 2 suits most contexts — use 1 when a card sits among many close siblings, and 3 for hero or featured cards.
1px border — quiet emphasis.
2px border — the default.
3px border — strong emphasis.
<aegov-card border-width="1"><p class="text-base">1px border — quiet emphasis.</p></aegov-card>
<aegov-card border-width="2"><p class="text-base">2px border — the default.</p></aegov-card>
<aegov-card border-width="3"><p class="text-base">3px border — strong emphasis.</p></aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardBorderWidth() {
return (
<>
<AegovCard borderWidth={1}><p className="text-base">1px border — quiet emphasis.</p></AegovCard>
<AegovCard borderWidth={2}><p className="text-base">2px border — the default.</p></AegovCard>
<AegovCard borderWidth={3}><p className="text-base">3px border — strong emphasis.</p></AegovCard>
</>
);
}
<template>
<aegov-card border-width="1"><p class="text-base">1px border — quiet emphasis.</p></aegov-card>
<aegov-card border-width="2"><p class="text-base">2px border — the default.</p></aegov-card>
<aegov-card border-width="3"><p class="text-base">3px border — strong emphasis.</p></aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-border-width',
imports: [AegovCard],
template: `
<aegov-card [borderWidth]="1"><p class="text-base">1px border — quiet emphasis.</p></aegov-card>
<aegov-card [borderWidth]="2"><p class="text-base">2px border — the default.</p></aegov-card>
<aegov-card [borderWidth]="3"><p class="text-base">3px border — strong emphasis.</p></aegov-card>
`,
})
export class CardBorderWidthComponent {}
Background
Cards default to a white surface (dark-mode aware). Override with any Tailwind background utility on the host — a design-system token, an arbitrary value, or your own class. For creative appearance, the inner content area still inherits the host's background, so a coloured surface shows through the centre while the gradient renders as the ring.
Default white surface.
Class override: bg-aeblack-50.
Creative ring on a bg-aegreen-50 surface.
<aegov-card>
<p class="text-base">Default white surface.</p>
</aegov-card>
<aegov-card class="bg-aeblack-50" appearance="light">
<p class="text-base">Class override: bg-aeblack-50.</p>
</aegov-card>
<aegov-card class="bg-aegreen-50" appearance="creative" variant="primary">
<p class="text-base">Creative ring on a bg-aegreen-50 surface.</p>
</aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardBackground() {
return (
<>
<AegovCard>
<p className="text-base">Default white surface.</p>
</AegovCard>
<AegovCard className="bg-aeblack-50" appearance="light">
<p className="text-base">Class override: bg-aeblack-50.</p>
</AegovCard>
<AegovCard className="bg-aegreen-50" appearance="creative" variant="primary">
<p className="text-base">Creative ring on a bg-aegreen-50 surface.</p>
</AegovCard>
</>
);
}
<template>
<aegov-card>
<p class="text-base">Default white surface.</p>
</aegov-card>
<aegov-card class="bg-aeblack-50" appearance="light">
<p class="text-base">Class override: bg-aeblack-50.</p>
</aegov-card>
<aegov-card class="bg-aegreen-50" appearance="creative" variant="primary">
<p class="text-base">Creative ring on a bg-aegreen-50 surface.</p>
</aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-background',
imports: [AegovCard],
template: `
<aegov-card>
<p class="text-base">Default white surface.</p>
</aegov-card>
<aegov-card class="bg-aeblack-50" appearance="light">
<p class="text-base">Class override: bg-aeblack-50.</p>
</aegov-card>
<aegov-card class="bg-aegreen-50" appearance="creative" variant="primary">
<p class="text-base">Creative ring on a bg-aegreen-50 surface.</p>
</aegov-card>
`,
})
export class CardBackgroundComponent {}
Hover effect
The hover property adds feedback when the pointer is over the card. Use standard for clickable tiles and glow for prominent links to a deeper page. Hover here is visual only — it never substitutes for the focus indicator on whatever's actually interactive inside. Hover over each card below to see the effect.
No hover — static surface.
Hover for a border colour shift.
Hover for a soft drop-shadow glow.
<aegov-card hover="off"><p class="text-base">No hover — static surface.</p></aegov-card>
<aegov-card hover="standard"><p class="text-base">Hover for a border colour shift.</p></aegov-card>
<aegov-card hover="glow"><p class="text-base">Hover for a soft drop-shadow glow.</p></aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardHover() {
return (
<>
<AegovCard hover="off"><p className="text-base">No hover — static surface.</p></AegovCard>
<AegovCard hover="standard"><p className="text-base">Hover for a border colour shift.</p></AegovCard>
<AegovCard hover="glow"><p className="text-base">Hover for a soft drop-shadow glow.</p></AegovCard>
</>
);
}
<template>
<aegov-card hover="off"><p class="text-base">No hover — static surface.</p></aegov-card>
<aegov-card hover="standard"><p class="text-base">Hover for a border colour shift.</p></aegov-card>
<aegov-card hover="glow"><p class="text-base">Hover for a soft drop-shadow glow.</p></aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-hover',
imports: [AegovCard],
template: `
<aegov-card hover="off"><p class="text-base">No hover — static surface.</p></aegov-card>
<aegov-card hover="standard"><p class="text-base">Hover for a border colour shift.</p></aegov-card>
<aegov-card hover="glow"><p class="text-base">Hover for a soft drop-shadow glow.</p></aegov-card>
`,
})
export class CardHoverComponent {}
Size
size controls the inner padding and outer corner radius. Three tokens are available — sm, base (default), and lg. Unlike Badge, Banner, and Callout's size, this is a fixed token: it does not accept a responsive breakpoint string, and it does not scale on its own at smaller viewports.
| Token | Padding | Radius |
|---|---|---|
sm |
1rem (16px) |
0.5rem |
base |
1.25rem (20px) |
0.75rem |
lg |
1.5rem (24px) |
1rem |
Compact padding and tighter radius.
The default size — suitable for most cards.
Generous padding for hero or featured cards.
<aegov-card size="sm"><p class="text-base">Compact padding and tighter radius.</p></aegov-card>
<aegov-card size="base"><p class="text-base">The default size — suitable for most cards.</p></aegov-card>
<aegov-card size="lg"><p class="text-base">Generous padding for hero or featured cards.</p></aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardSizes() {
return (
<>
<AegovCard size="sm"><p className="text-base">Compact padding and tighter radius.</p></AegovCard>
<AegovCard size="base"><p className="text-base">The default size — suitable for most cards.</p></AegovCard>
<AegovCard size="lg"><p className="text-base">Generous padding for hero or featured cards.</p></AegovCard>
</>
);
}
<template>
<aegov-card size="sm"><p class="text-base">Compact padding and tighter radius.</p></aegov-card>
<aegov-card size="base"><p class="text-base">The default size — suitable for most cards.</p></aegov-card>
<aegov-card size="lg"><p class="text-base">Generous padding for hero or featured cards.</p></aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-sizes',
imports: [AegovCard],
template: `
<aegov-card size="sm"><p class="text-base">Compact padding and tighter radius.</p></aegov-card>
<aegov-card size="base"><p class="text-base">The default size — suitable for most cards.</p></aegov-card>
<aegov-card size="lg"><p class="text-base">Generous padding for hero or featured cards.</p></aegov-card>
`,
})
export class CardSizesComponent {}
Padding
By default the content area has padding scaled to size (see above). Set is-padding="false" for edge-to-edge content — a media image, a data table, or anything that should bleed to the border. Supply your own inner padding for any body content beneath.
Padded (default)
Standard content area padding.
Edge-to-edge
Own inner padding, bleeds to the border.
<aegov-card>
<h3 class="font-bold text-lg m-0">Padded (default)</h3>
<p class="text-base mt-2">Standard content area padding.</p>
</aegov-card>
<aegov-card is-padding="false">
<div style="padding:1.25rem;">
<h3 class="font-bold text-lg m-0">Edge-to-edge</h3>
<p class="text-base mt-2">Own inner padding, bleeds to the border.</p>
</div>
</aegov-card>
import { AegovCard } from '@aegov/designsystem-react';
export default function CardPadding() {
return (
<>
<AegovCard>
<h3 className="font-bold text-lg m-0">Padded (default)</h3>
<p className="text-base">Standard content area padding.</p>
</AegovCard>
<AegovCard isPadding={false}>
<div style={{ padding: '1.25rem' }}>
<h3 className="font-bold text-lg m-0">Edge-to-edge</h3>
<p className="text-base">Own inner padding, bleeds to the border.</p>
</div>
</AegovCard>
</>
);
}
<template>
<aegov-card>
<h3 class="font-bold text-lg m-0">Padded (default)</h3>
<p class="text-base mt-2">Standard content area padding.</p>
</aegov-card>
<aegov-card is-padding="false">
<div style="padding:1.25rem;">
<h3 class="font-bold text-lg m-0">Edge-to-edge</h3>
<p class="text-base mt-2">Own inner padding, bleeds to the border.</p>
</div>
</aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-padding',
imports: [AegovCard],
template: `
<aegov-card>
<h3 class="font-bold text-lg m-0">Padded (default)</h3>
<p class="text-base mt-2">Standard content area padding.</p>
</aegov-card>
<aegov-card [isPadding]="false">
<div style="padding:1.25rem;">
<h3 class="font-bold text-lg m-0">Edge-to-edge</h3>
<p class="text-base mt-2">Own inner padding, bleeds to the border.</p>
</div>
</aegov-card>
`,
})
export class CardPaddingComponent {}
Grid spanning
data-col-span and data-row-span control how many columns or rows a card spans inside an aegov-bento-grid (or any CSS grid container reading these attributes). Both accept a plain integer or a responsive syntax using Tailwind-style breakpoint prefixes — the exact same mechanism aegov-bento-grid's own props use, documented on its own page.
Featured — spans 2 columns
A wider card draws the eye to the most important tile.
Quick stat
<aegov-bento-grid cols="1 md:3" gap="md">
<aegov-card data-col-span="2" appearance="light" hover="standard">
<h3 class="font-bold text-lg m-0">Featured — spans 2 columns</h3>
<p class="text-base mt-2">A wider card draws the eye to the most important tile.</p>
</aegov-card>
<aegov-card appearance="light">
<p class="text-sm">Quick stat</p>
</aegov-card>
</aegov-bento-grid>
import { AegovBentoGrid, AegovCard } from '@aegov/designsystem-react';
export default function CardGridSpan() {
return (
<AegovBentoGrid cols="1 md:3" gap="md">
<AegovCard dataColSpan="2" appearance="light" hover="standard">
<h3 className="font-bold text-lg m-0">Featured — spans 2 columns</h3>
<p className="text-base">A wider card draws the eye to the most important tile.</p>
</AegovCard>
<AegovCard appearance="light">
<p className="text-sm">Quick stat</p>
</AegovCard>
</AegovBentoGrid>
);
}
<template>
<aegov-bento-grid cols="1 md:3" gap="md">
<aegov-card data-col-span="2" appearance="light" hover="standard">
<h3 class="font-bold text-lg m-0">Featured — spans 2 columns</h3>
<p class="text-base mt-2">A wider card draws the eye to the most important tile.</p>
</aegov-card>
<aegov-card appearance="light">
<p class="text-sm">Quick stat</p>
</aegov-card>
</aegov-bento-grid>
</template>
import { Component } from '@angular/core';
import { AegovBentoGrid, AegovCard } from '@aegov/designsystem-angular';
@Component({
selector: 'app-card-grid-span',
imports: [AegovBentoGrid, AegovCard],
template: `
<aegov-bento-grid cols="1 md:3" gap="md">
<aegov-card dataColSpan="2" appearance="light" hover="standard">
<h3 class="font-bold text-lg m-0">Featured — spans 2 columns</h3>
<p class="text-base mt-2">A wider card draws the eye to the most important tile.</p>
</aegov-card>
<aegov-card appearance="light">
<p class="text-sm">Quick stat</p>
</aegov-card>
</aegov-bento-grid>
`,
})
export class CardGridSpanComponent {}
Composing with components
Cards compose well with other AEGOV components — titles, text, and links — to build service tiles, summary panels, and dashboard sections.
Examination of Medical Fitness for Residency Visa
This service enables citizens to obtain a medical fitness certificate required for residency visa applications, renewals, or medical clearance purposes.
<aegov-card>
<h3 class="font-bold text-lg m-0">Examination of Medical Fitness for Residency Visa</h3>
<p class="text-base line-clamp-2 mt-2">This service enables citizens to obtain a medical fitness certificate required for residency visa applications, renewals, or medical clearance purposes.</p>
<aegov-link href="#" extra-class="inline-flex items-center gap-1 mt-4">
Apply now
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
import { AegovCard, AegovLink } from '@aegov/designsystem-react';
export default function ServiceTile() {
return (
<AegovCard>
<h3 className="font-bold text-lg m-0">Examination of Medical Fitness for Residency Visa</h3>
<p className="text-base line-clamp-2 mt-2">This service enables citizens to obtain a medical fitness certificate required for residency visa applications, renewals, or medical clearance purposes.</p>
<AegovLink href="#" extraClass="inline-flex items-center gap-1 mt-4">
Apply now
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" className="size-4" aria-hidden="true"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" fill="currentColor"/></svg>
</AegovLink>
</AegovCard>
);
}
<template>
<aegov-card>
<h3 class="font-bold text-lg m-0">Examination of Medical Fitness for Residency Visa</h3>
<p class="text-base line-clamp-2 mt-2">This service enables citizens to obtain a medical fitness certificate required for residency visa applications, renewals, or medical clearance purposes.</p>
<aegov-link href="#" extra-class="inline-flex items-center gap-1 mt-4">
Apply now
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
</template>
import { Component } from '@angular/core';
import { AegovCard, AegovLink } from '@aegov/designsystem-angular';
@Component({
selector: 'app-service-tile',
imports: [AegovCard, AegovLink],
template: `
<aegov-card>
<h3 class="font-bold text-lg m-0">Examination of Medical Fitness for Residency Visa</h3>
<p class="text-base line-clamp-2 mt-2">This service enables citizens to obtain a medical fitness certificate required for residency visa applications, renewals, or medical clearance purposes.</p>
<aegov-link href="#" extraClass="inline-flex items-center gap-1 mt-4">
Apply now
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M221.66,133.66l-72,72a8,8,0,0,1-11.32-11.32L196.69,136H40a8,8,0,0,1,0-16H196.69L138.34,61.66a8,8,0,0,1,11.32-11.32l72,72A8,8,0,0,1,221.66,133.66Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
`,
})
export class ServiceTileComponent {}
RTL support
The card itself is direction-agnostic — a simple bordered surface. Slotted content follows the document dir automatically, so headings, text, and inline icons mirror without extra configuration.
فحص اللياقة الطبية لتأشيرة الإقامة
تتيح هذه الخدمة للمواطنين الحصول على شهادة اللياقة الطبية المطلوبة لطلبات تأشيرة الإقامة أو تجديدها أو لأغراض التخليص الطبي.
<div dir="rtl">
<aegov-card>
<h3 class="font-bold text-lg m-0">فحص اللياقة الطبية لتأشيرة الإقامة</h3>
<p class="text-base line-clamp-2 mt-2">تتيح هذه الخدمة للمواطنين الحصول على شهادة اللياقة الطبية المطلوبة لطلبات تأشيرة الإقامة أو تجديدها أو لأغراض التخليص الطبي.</p>
<aegov-link href="#" extra-class="inline-flex items-center gap-1 mt-4">
قدّم الآن
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
</div>
import { AegovCard, AegovLink } from '@aegov/designsystem-react';
export default function RtlCard() {
return (
<div dir="rtl">
<AegovCard>
<h3 className="font-bold text-lg m-0">فحص اللياقة الطبية لتأشيرة الإقامة</h3>
<p className="text-base line-clamp-2 mt-2">تتيح هذه الخدمة للمواطنين الحصول على شهادة اللياقة الطبية المطلوبة لطلبات تأشيرة الإقامة أو تجديدها أو لأغراض التخليص الطبي.</p>
<AegovLink href="#" extraClass="inline-flex items-center gap-1 mt-4">
قدّم الآن
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" className="size-4" aria-hidden="true"><path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" fill="currentColor"/></svg>
</AegovLink>
</AegovCard>
</div>
);
}
<template>
<div dir="rtl">
<aegov-card>
<h3 class="font-bold text-lg m-0">فحص اللياقة الطبية لتأشيرة الإقامة</h3>
<p class="text-base line-clamp-2 mt-2">تتيح هذه الخدمة للمواطنين الحصول على شهادة اللياقة الطبية المطلوبة لطلبات تأشيرة الإقامة أو تجديدها أو لأغراض التخليص الطبي.</p>
<aegov-link href="#" extra-class="inline-flex items-center gap-1 mt-4">
قدّم الآن
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
</div>
</template>
import { Component } from '@angular/core';
import { AegovCard, AegovLink } from '@aegov/designsystem-angular';
@Component({
selector: 'app-rtl-card',
imports: [AegovCard, AegovLink],
template: `
<div dir="rtl">
<aegov-card>
<h3 class="font-bold text-lg m-0">فحص اللياقة الطبية لتأشيرة الإقامة</h3>
<p class="text-base line-clamp-2 mt-2">تتيح هذه الخدمة للمواطنين الحصول على شهادة اللياقة الطبية المطلوبة لطلبات تأشيرة الإقامة أو تجديدها أو لأغراض التخليص الطبي.</p>
<aegov-link href="#" extraClass="inline-flex items-center gap-1 mt-4">
قدّم الآن
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 256" class="size-4" aria-hidden="true"><path d="M224,128a8,8,0,0,1-8,8H59.31l58.35,58.34a8,8,0,0,1-11.32,11.32l-72-72a8,8,0,0,1,0-11.32l72-72a8,8,0,0,1,11.32,11.32L59.31,120H216A8,8,0,0,1,224,128Z" fill="currentColor"/></svg>
</aegov-link>
</aegov-card>
</div>
`,
})
export class RtlCardComponent {}
Usage
Here is the recommended usage of a card on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.
Match variant to semantic intent, not just colour preference
Reserve primary for main brand actions, secondary for supporting content, and neutral-max/neutral-min for quiet or de-emphasised panels — a consistent mapping helps the same variant mean the same thing across a page.
Keep border-width consistent across sibling cards
Mixing 1, 2, and 3 within the same grid or list reads as visual noise rather than intentional hierarchy — pick one value per collection and use hover/variant to differentiate instead.
Do not attach a click handler to the card host with no focusable element inside
The card has no built-in role or keyboard behaviour. A hover="glow" card with a bare onclick on the host is invisible to keyboard and screen-reader users — wrap the content in a real <a> or <button>.
Do not expect size to scale down at smaller viewports
Unlike Badge, Banner, and Callout, size is a fixed token, not a responsive string — a size="lg" card stays size="lg" on every screen width. Set the size explicitly per breakpoint yourself if you need it to change.
Do not use hover="glow" on a purely static, non-interactive card
A glow effect signals "this responds to you" — applying it to a card with no link, button, or click target sets up an expectation the card doesn't deliver on.
API reference
The following are the properties and references of a card
aegov-card default properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| DOM id reflected on the inner content |
| auto-generated |
|
|
|
|
| Colour family for the border, hover shift, and glow shadow. |
|
|
| Border thickness in pixels ( |
|
|
|
|
|
|
| Controls inner padding and corner radius. A fixed token — unlike Badge, Banner, and Callout's |
|
|
| Whether the inner content area has padding at all. Turn off for edge-to-edge media. |
|
|
| Columns to span inside an |
| (none) |
| Rows to span inside an |
| (none) |
Slots
| Slot | Description |
|---|---|
(default) | Card content. Any markup or other AEGOV components are allowed here. |
Events
| Event | Description |
|---|---|
(none) | The component emits no custom events — it is a pure structural surface. |
Pass-through attributes
| Attribute | Notes | Forwards to |
|---|---|---|
| Forwarded to the inner content | inner |
| Forwarded to the inner content | inner |
| Not forwarded. Use | n/a |
| Applied to the host element — this is how you set a custom background colour (see Background). | host |
There is no built-in click handling or role. If a whole card should be interactive, wrap its content in a real focusable element (<a> or <button>) yourself — see Notes below.
Notes
The following notes are applicable of this component.
Built-in accessibility
- The card renders a single
<div>with no implicit role, so it never interferes with assistive-technology announcements of its slotted content. - Hover styles (
standard/glow) are visual only — they never substitute for a real focus indicator on whatever's actually interactive inside.
Developer responsibility
The following is required for a developer to add additionally or pay attention to regarding this component.
- If the whole card should be clickable, wrap its contents in a single focusable
<a>or<button>yourself. Do not attach a click handler to the card host with no focusable element inside — keyboard and screen-reader users would have nothing to activate. - When a card represents a labelled region, set
role="region"andaria-labelledby(pointing at the heading inside) via host attributes — the card supplies neither on its own. - Check colour contrast for slotted content against whatever background utility,
appearance, andvariantyou chose — the component does not validate this for you. - For media cards using
is-padding="false", supply realalttext on every image and add your own inner padding so headings and body copy don't touch the border. - The heading level used inside a card (
h3in some examples on this page,h4in others) is illustrative, not a rule — pick whatever level is next in your actual page's outline. A grid of cards sitting directly under anh2section heading should useh3; the same card nested one level deeper (for example inside a tabbed panel whose own heading is already anh3) should useh4instead. Never skip a level just to match an example on this page.
Additional notes
sizeis a fixed token (sm/base/lg) — it does not accept a responsive breakpoint string the way Badge, Banner, and Callout'ssizeprops do. Set a differentsizeper breakpoint yourself (e.g. conditionally, or via your own wrapper classes) if you need one.border-widthonly visibly affectssolid/lightappearances. Forcreative, the same prop instead sets the gradient ring's thickness via padding — border-width itself is forced to0.