An `<sp-illustrated-message>` displays an outline illustration and a message, usually in an empty state or on an error page. It is also used inside a [DropZone](/components/dropzone).
npm install @spectrum-web-components/illustrated-messageAn displays an outline illustration and a message, usually in an empty state or on an error page. It is also used inside a DropZone.



``zsh`
yarn add @spectrum-web-components/illustrated-message
Import the side effectful registration of via:
`js`
import '@spectrum-web-components/illustrated-message/sp-illustrated-message.js';
When looking to leverage the IllustratedMessage base class as a type and/or for extension purposes, do so via:
`js`
import { IllustratedMessage } from '@spectrum-web-components/illustrated-message';
An illustrated message consists of the following parts:
- An outline illustration that supports the messaging. The illustrated message accepts an
`html`
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 200 100"
width="200"
height="100"
>
d="M110.53,85.66,100.26,95.89a1.09,1.09,0,0,1-1.52,0L88.47,85.66"
>
d="M126.5,22.5h-19a2,2,0,0,1-2-2V1.5h-31a2,2,0,0,0-2,2v68a2,2,0,0,0,2,2h19"
>
d="M47.93,50.49a5,5,0,1,0-4.83-5A4.93,4.93,0,0,0,47.93,50.49Z"
>
d="M36.6,65.93,42.05,60A2.06,2.06,0,0,1,45,60l12.68,13.2"
>
d="M3.14,73.23,22.42,53.76a1.65,1.65,0,0,1,2.38,0l19.05,19.7"
>
d="M139.5,36.5H196A1.49,1.49,0,0,1,197.5,38V72A1.49,1.49,0,0,1,196,73.5H141A1.49,1.49,0,0,1,139.5,72V32A1.49,1.49,0,0,1,141,30.5H154a2.43,2.43,0,0,1,1.67.66l6,5.66"
>
x="1.5"
y="34.5"
width="58"
height="39"
rx="2"
ry="2"
>
from your computer.
`html`
This page isn't available. Try checking the URL or visit a different
page.
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 150 103"
width="150"
height="103"
>
>
`html`
description="This page isn't available. Try checking the URL or visit a different page."
>
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 150 103"
width="150"
height="103"
viewBox="0 0 150 103"
>
>
The
- Always include a clear, standalone heading. All illustrated messages must include a heading or title. This heading communicates the result of why the UI is appearing in the way that it is. If included, the description elaborates on the heading and offers more information.
- Ensure that text and image work together. The illustration within an illustrated message adds value to the language that it’s paired with, and vice versa. An illustration’s meaning should be readily clear, contextual, and relevant to the overall message described in the text.
- Provide actionable solutions. Offer an actionable solution when possible by using links or buttons.
- Make error codes meaningful and contextual. If an illustrated message is for an error state, use the heading to summarize the error. Only include an error code or other technical information if it’s useful and relevant for the user. Put the error code either at the beginning of the heading using a colon, or at the end of the message using parentheses; don’t hide it in the middle of the heading or bury it in the description.