Skip to content
lab components / Visuals

Illustration

Illustrations visually enhance content and concepts, creating engaging experiences.

This is a Lab component!

That means it doesn't satisfy our definition of done and may be changed or even deleted. For an exact status, please reach out to the Fancy team through the dev_fancy or ux_fancy channels.

Looking for a specific illustration? Visit the Illustrations Overview page for a complete overview of all available illustrations.

import { Illustration } from "@siteimprove/fancylab";

#Purpose

Illustrations are valuable assets when used intentionally. They should be clear, relevant, and enhance the user's experience, not detract from it.

Illustrations can:

  • Enhance Understanding: Clarify complex concepts, processes, or data.
  • Create Emotional Connection: Evoke specific moods, feelings, or brand personality.
  • Add Visual Interest: Break up text-heavy layouts and guide the user's eye.
  • Provide Visual Cues: Direct attention, suggest actions, or enhance navigation.

#Examples

Accessibility illustration
<Illustration src={IllustrationSuccess} alt="Accessibility illustration" />

#Sizes

Illustrations can be used in various sizes to fulfill different purposes:

  • xSmall / Small(Icons/ pictorgrams): Used for visual cues, actions, or within text.
  • Medium(Supporting): Reinforce content within sections, cards, or lists.
  • Large (Hero/Header): Introduce sections, create a visual anchor, or stand alone.
Illustration with custom sizeSmall size illustrationMedium size illustrationLarge size illustration
<Illustration src={IllustrationSuccess} size={{ width: 32, height: 32 }} alt="Illustration with custom size" /> <Illustration src={IllustrationSuccess} size="small" alt="Small size illustration" /> <Illustration src={IllustrationSuccess} size="medium" alt="Medium size illustration" /> <Illustration src={IllustrationSuccess} size="large" alt="Large size illustration" />

#Decorative

Decorative illustrations are purely aesthetic and do not convey essential information. They should be used sparingly to avoid clutter and maintain visual hierarchy.

<Illustration src={IllustrationSuccess} decorative />

#Properties

Illustration example
PropertyDescriptionDefinedValue
srcRequired
stringThe illustration image source (base64, SVG, URL, or file path)
sizeOptional
"large" | "medium" | "small" | objectControls the illustration size - defaults to medium
altOptional
stringMeaningful alt text that explains the illustration
decorativeOptional
booleanIf true, the illustration doesn’t need an alt text
data-observe-keyOptional
stringUnique string, used by external script e.g. for event tracking
classNameOptional
stringCustom className that's applied to the outermost element (only intended for special cases)
styleOptional
objectStyle object to apply custom inline styles (only intended for special cases)
tabIndexOptional
numberTab index of the outermost HTML element of the component
onKeyDownOptional
functionCallback for onKeyDown event
onMouseDownOptional
functionCallback for onMouseDown event
onMouseEnterOptional
functionCallback for onMouseEnter event
onMouseLeaveOptional
functionCallback for onMouseLeave event
onFocusOptional
functionCallback for onFocus event
onBlurOptional
functionCallback for onBlur event

#Guidelines

#Best practices

#General

Use Illustration when

  • Guiding Users: Simplify complex processes or abstract concepts with visual walkthroughs, step-by-step guides, or diagrams.
  • Providing Context: Enhance understanding and clarify information by adding visual elements to text-heavy content. Use illustrations to demonstrate the purpose of a feature or the benefits of using a product.

#Placement

Illustration is typically used in the following places:

  • Alongside text: To complement written content or show as quick-link items (e.g SEO overview).
  • Within cards: To provide visual context. (e.g Empty state )

#Style

  • Siteimprove Design System: Adhere to Siteimprove's guidelines for color, typography, and spacing. If you are not using a component from Fancy, match the styling of your Illustration to existing components for visual consistency.
  • Align illustration style with the overall message and brand. If you need customised illustration in your project, please fill the form, and send the request to marketing.
  • Choose illustrations that directly relate to the content.
  • Ensure illustrations don't overshadow essential content.
  • Be mindful of cultural interpretations of visual elements.
  • Illustrations should complement, not duplicate, written information.
  • Too many illustrations can be distracting and overwhelming.
  • Illustrations should never hinder the user's ability to interact with the interface.

#Do not use when

  • The message is simple and can be conveyed with text alone
  • The illustration doesn't align with your brand's visual style.
  • The illustration is overly complex or detailed.
  • The illustration doesn't scale well across different screen sizes and devices.

#Accessibility

#For designers

  • Provide concise, descriptive alt text for screen readers.
  • Ensure sufficient contrast for visibility.

#For developers

This component comes with built-in accessibility, no extra work required.

Explore detailed guidelines for this component: Accessibility Specifications

#Writing

  • Explain the illustration's purpose or connection to the content.
  • Use short, descriptive accompanying text.