Skip to main content
HeroSquare
@coinbase/cds-web@8.75.2
Displays a square-shaped hero illustration.
import { HeroSquare } from '@coinbase/cds-web/illustrations/HeroSquare'

Illustrations

dimension prop:
240x240
200x200

Basic example

Loading...

scaleMultiplier prop

If no predefined dimensions fit your use case, you can use the scaleMultiplier prop to scale the illustration.

Use scaleMultiplier sparingly and with caution. We have predefined dimensions to ensure that illustrations scale elegantly.

Loading...

Scaling with dimension

If dimension and scaleMultiplier are both provided the component will scale based on the provided dimension.

Loading...

Theming

Use the applyTheme prop to enable dynamic theming. When set, the illustration is inlined into the page and colored by the active ThemeProvider's illustration palette instead of loading a static image from the CDN.

This allows the illustration to update automatically when the active color scheme changes, and to reflect a custom brand palette when a non-default theme is provided.

Loading...

To apply a custom brand palette, set lightIllustrationColor and darkIllustrationColor on your theme and wrap the illustration in a ThemeProvider:

Loading...

When applyTheme is not set (the default), the illustration loads as a standard <img> from the CDN with hardcoded colors — no performance overhead.

Is this page useful?

Coinbase Design is an open-source, adaptable system of guidelines, components, and tools that aid the best practices of user interface design for crypto products.