Card
A bordered, padded surface for grouping related content.
fandry-card
Example
Link to section ExampleCustom colors and parts
Link to section Custom colors and partsThe same component with a few --fd-* tokens set around it and its parts restyled. The code is under Parts below.
Props
Link to section PropsThis component has no configurable props — compose it via slots.
Parts
Link to section PartsStyle the elements inside the component from your own CSS with ::part(). Every fandry component renders in native shadow DOM, so parts work on LWR and Salesforce alike. For colors, spacing, radius and type across many components, set the --fd-* tokens instead. The code for the "Custom colors and parts" example above:
| Part | Description |
|---|---|
base | The outermost element. |
<!-- template -->
<div class="brand row">
<fandry-card class="promo">
<fandry-heading level="4">Summer sale</fandry-heading>
<fandry-text variant="muted">Up to 40% off trail gear, this week only.</fandry-text>
</fandry-card>
</div>
/* css */
/* Scoped to this demo. Set the same --fd-* tokens on :root to theme
every fandry-* component on the site. */
.brand {
--fd-radius-lg: 1.25rem;
--fd-border: 160 30% 85%;
--fd-text-muted: 160 15% 38%;
}
fandry-card::part(base) {
padding: 1.5rem;
box-shadow: 0 8px 24px hsl(160 40% 20% / 0.12);
}
/* One card only, gradient and all. */
.promo::part(base) {
background: linear-gradient(135deg, hsl(160 60% 95%), hsl(45 90% 93%));
}
Code
Link to section Code<fandry-card> <fandry-heading level="3">Pro Plan</fandry-heading> <fandry-text variant="muted">Everything in Free, plus priority support.</fandry-text> </fandry-card>