Image
An image component that can switch between light and dark themes.
When to use
- Content that is genuinely an image, such as a screenshot, a photograph or an illustration.
- Anywhere the picture carries information the surrounding text does not.
When not to use
- An icon. That is an icon, which inherits colour and scales with text.
- A logo. That is a logo, which has its own rules.
- Decoration that adds nothing. An image that says nothing still costs the reader time to load and skip.
Content
What to write, and what to leave out.
- Write the alt text as what the image says, not as what it is. A queue with four unassigned conversations, not Screenshot.
- Use an empty alt for a purely decorative image, so a screen reader passes over it rather than announcing a filename.
- Do not start with Image of. The reader is already told it is an image.