ActivationCard
ActivationCards are used in groups to communicate a user’s stage in a series of steps toward an overall action.
Props
Usage guidelines
When to use
- Use in groups to describe the user's stage in a sequential path toward an overall action.
When not to use
- As a single element communicating updates to the state or status of the surface. Use BannerCallout instead.
Accessibility
Localization
Be sure to localize all text strings. Note that localization can lengthen text by 20 to 30 percent.
Note that dismissButton.accessibilityLabel
is optional as DefaultLabelProvider provides default strings. Use custom labels if they need to be more specific.
ActivationCard depends on DefaultLabelProvider for internal text strings. Localize the texts via DefaultLabelProvider. Learn more
import { ActivationCard, Box, DefaultLabelProvider } from 'gestalt'; export default function Example() { return ( <DefaultLabelProvider labels={{ ActivationCard: { accessibilityDismissButtonLabel: 'Entlassen.', }, }} > <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8} > <ActivationCard dismissButton={{ accessibilityLabel: 'Karte entlassen.', onDismiss: () => {}, }} link={{ href: 'https://pinterest.com', label: 'Erfahren Sie mehr', accessibilityLabel: 'Erfahren Sie mehr über den Antragsstatus der Website.', }} message="Wir werden Sie per E-Mail benachrichtigen, sobald Ihre Website erfolgreich angemeldet wurde." status="pending" statusMessage="Anhängig" title="Beanspruchen Sie Ihre Website" /> </Box> </DefaultLabelProvider> ); }
Variants
Not Started
import { ActivationCard, Box, Flex } from 'gestalt'; export default function Example() { return ( <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8} > <Flex> <ActivationCard dismissButton={{ accessibilityLabel: 'Dismiss card', onDismiss: () => {}, }} link={{ href: 'https://pinterest.com', label: 'Claim your website now', accessibilityLabel: '', }} message="Grow distribution and track Pins linked to your website" status="notStarted" statusMessage="Not started" title="Claim your website" /> </Flex> </Box> ); }
Pending
import { ActivationCard, Box, Flex } from 'gestalt'; export default function Example() { return ( <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8} > <Flex> <ActivationCard dismissButton={{ accessibilityLabel: 'Dismiss card', onDismiss: () => {}, }} link={{ href: 'https://pinterest.com', label: 'Learn more', accessibilityLabel: 'Learn more: website claim status', }} message="We will notify you via email as soon as your site has been successfully claimed." status="pending" statusMessage="Pending" title="Claim your website" /> </Flex> </Box> ); }
Needs Attention
import { ActivationCard, Box, Flex } from 'gestalt'; export default function Example() { return ( <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8} > <Flex> <ActivationCard dismissButton={{ accessibilityLabel: 'Dismiss card', onDismiss: () => {}, }} link={{ accessibilityLabel: 'Learn more about tag health', href: 'https://pinterest.com', label: 'Learn more', }} message="Oops! Your tag must be healthy to continue." status="needsAttention" statusMessage="Needs attention" title="Tag is unhealthy" /> </Flex> </Box> ); }
Complete
import { ActivationCard, Box, Flex } from 'gestalt'; export default function Example() { return ( <Box alignItems="center" display="flex" height="100%" justifyContent="center" padding={8} > <Flex> <ActivationCard message="Tag is installed and healthy" status="complete" statusMessage="Completed" title="Nice work" /> </Flex> </Box> ); }
Component quality checklist
Quality item | Status | Status description |
---|---|---|
Figma Library | Partially ready | Component is live in Figma, however may not be available for all platforms. |
Responsive Web | Ready | Component responds to changing viewport sizes in web and mobile web. |