caption
Provides context and credit for an asset such as an image, video, or chart
Type | Purpose |
---|---|
Medium (default) | Caption aligns to the left alongside the body copy with inset padding. Default caption includes summary and credit. |
Summary | Summary has same CSS styles as the default, but only the summary element is displayed. |
Credit | Credit has same CSS styles as the default, but only the credit element is displayed. |
Caption with image | The captions component is text-only, but is meant to be displayed in the context of a media object. |

Do provide a caption for images when attribution information is available.

Don't use captions without associated media content (image, video, chart, etc.).

Do left align the caption to the body copy.

Don't center the caption beneath the media.
Anatomy
- Captions align to the left border based on the paragraph container. They are not centered under the media object
- Max width is 498 pixels, even if the media (image, video, or chart) extends beyond the paragraph max width

Do write concise, informative summaries.

Don't write long summaries that wrap to more than 3 lines on desktop breakpoints.
Available caption fields
The caption component has two separate fields: summary and credit. While they often appear together, one is not dependent on the other. However, both are dependent on media content (image, video, etc).
Summary text gives the context to the media:
- Keep summary text concise, 1-2 lines at LG breakpoint
- Use sentence case
Credit provides attribution to the correct sources:
- Use to help users evaluate the strength and validity of the material the author has used
- Begin credit text with “Video Credit” or “Image Credit”

Do provide further explanation of media in the summary field and attribution in the credit field.

Don't combine attribution within the summary field.
Types of accreditations
For photos submitted by customers or members:
- Provide first name, initial of last name (not full last name)
- If available, use the social media site handle (for example, Madeline G. @maddyluv) from where the asset was provided
For multiple photo accreditations:
- List in clockwise order from top
- Separate by commas and semicolons
- Don't use breaking spaces
- For example, “Image Credits: top left, Madeline G. @maddyluv; top right, Kevin C.; bottom right, George M. @gmonkey”
For purchased assets (photos or video):
Use full name, provided a signed release is on file.
For copyrighted media (photos or video):
- Use © symbol and date separated by (non-breaking) spaces and photographer name. (e.g. © 2017 Norm Bellows)
- If date is not available, use © symbol and photographer name separated by a (non-breaking) space. (e.g. © Norm Bellows)
What Cedar provides
CdrCaption uses text color with a Level AA contrast ratio of 4.5:1 contrast between the text color and the background, but only when displayed on light backgrounds.
Development responsibilities
When using this component, here's what you are responsible for:
- Use captions sparingly and only with accompanied media
- Don’t use caption text styles for body copy. It is smaller than the recommended size for text readability
The CdrCaption component is developed to work within a composition with other components. However, composition-type components have not been developed yet.
How to extend this component for use within a figure:
<figure>
<cdr-img src="http://via.placeholder.com/350x150" />
<figcaption>
<cdr-caption
summary="Testing and validating the final fit of the 2018/2019 Tecnica ski boot collection during the September 2017 focus group in Park City, Utah"
credit="Image Credit: Blizzard Tecnica”
/>
</figcaption>
</figure>
CdrCaption
Props
Name | Type | Default |
---|---|---|
summary Sets the string content for the description body of the caption. | string | |
credit Sets the string content for attribution. | string |