CardNew: New
Title of the card
Subtitle that provides extra information or clarification.
Features
- Enables easy construction of the Card's content with subcomponents.
- Provides a Divider for strong visual separation between sections.
- Applies correct sizing to pictograms with a subcomponent.
- Features a built-in spacing system for the subcomponents.
When to use
Use a Card when you have a collection of related content and actions that you want to group together and visually separate from the rest of the page.
Examples
Spacing
The Card's subcomponents have built-in spacing. This means you don't need to add or remove spacing when using the subcomponents in their intended order:
- Pictogram
- Header
- Body
- Footer
When deviating from this order, you may need to adjust the subcomponents' spacing. This can be done with the hasSpacingTop
and hasSpacingBottom
props.
If you're not using the subcomponents to create content for a Card, you can still align with the Card's spacing system. This is enabled through the cardHorizontalSpacing
and cardVerticalSpacing
component tokens, which can be imported like this:
import {cardHorizontalSpacing, cardVerticalSpacing} from '@pleo-io/telescope'
Pictogram
When using an pictogram inside a Card, it should be nested inside of a Card.Pictogram
subcomponent, which should be the first child of the Card.
Keep your tokens safe
- Save them in a secure location
- Treat them like a password
- Use a separate token for each app and environment
- If security has been compromised, regenerate them
- Do NOT store them in public places or shared docs
Custom content and layout
The Card is intended to be a versatile container. This means that you can include any type of content. It also means that you can customise the layout supplied by the subcomponents.
Company review
You can also omit the subcomponents and only use the Card as a container if an entirely custom content and layout best suits your use case.
Divider
The vertical spacing of the Card's subcomponents does not always create sufficient visual separation. The Card.Divider
subcomponent can help create a stronger separation.
Invite new user
By Olga Radzikowska • Product designer
Requested invite
Best practices
Related components
- Accordion: A stacked set of interactive items that you can click to show more information. Each item can be either collapsed or expanded to reveal the complete content.
- Drawer: A panel that slides out from the edge of the screen to focus a user's attention on completing a task or viewing details about an item.
- Modal: A page overlay that displays information and blocks interaction with the page until an action is taken or the modal is dismissed.