Introduction
The Natura11y card component organizes and displays content that users can interact with.
The Card Component
Here's an example of a basic card component.
Line # | Details |
---|---|
1 | The parent |
3-5 | The |
7-14 | The |
16-29 | The |
Including Media
To include an image or video within a card, add the .card__media
child selector to the card component. This selector is optional.
Cards Within Grids
It's common to display cards within a grid component. When doing so, the card footer aligns to the bottom. Consider the following example. Each card has a different character count, while their actionable footers remain aligned.
Prunus mume
Prunus mume is an East Asian and Southeast Asian tree species classified in the Armeniaca section of the genus Prunus subgenus Prunus.
Eschscholzia californica
Eschscholzia californica, the California poppy, golden poppy, California sunlight or cup of gold, is a species of flowering plant in the family Papaveraceae, native to the United States and Mexico.
Geranium pratense
Geranium pratense, the meadow crane's-bill or meadow geranium, is a species of flowering plant in the family Geraniaceae, native to Europe and Asia.
Horizontal Card
The horizontal card modifier (.card--horizontal
) provides a layout where an image is placed next to contextual content, creating a side-by-side card. This design is intended to offer simple flexibility, especially in scenarios where the image is mostly vertical (portrait orientation).
Flexibility of the Horizontal Card Component
The horizontal card component automatically adjusts its layout based on the presence of different child elements, such as headers, footers, and body content. This behavior allows the card to be versatile in various use cases:
With Header and Footer
When both a header and a footer are present, the card gracefully accommodates these elements by adjusting the space allocated for the image and the content, ensuring a balanced and cohesive appearance.
Tropical flowers
Stellaria graminea
Stellaria graminea is a species of flowering plant in the family Caryophyllaceae.
With Only a Header
If the card only includes a header and body content, the layout still maintains a clear separation between the image and text, while providing ample space for the content to be the focal point.
Tropical flowers
Stellaria graminea
Stellaria graminea is a species of flowering plant in the family Caryophyllaceae.
Visit WikipediaWithout Header or Footer
Even in its most minimal configuration, with just the image and body content, the horizontal card remains aesthetically pleasing and functional.
Stellaria graminea
Stellaria graminea is a species of flowering plant in the family Caryophyllaceae.
Visit Wikipedia