@@ -21,7 +21,7 @@ import { changelogData } from "./heroChangelogData";
2121 componentName = " Hero"
2222 summary = " A full-width banner at the top of a page"
2323 versionAdded = " 0.2.0"
24- versionLatest = " 4.1.3 "
24+ versionLatest = " 4.1.4 "
2525/>
2626
2727<Canvas of = { HeroStories .WithControls } />
@@ -205,9 +205,10 @@ The `"campaign"` hero variant should be used with `backgroundImageSrc`,
205205` heading ` , and ` imageProps ` props. ` backdropBackgroundColor ` , ` subHeaderText ` ,
206206` textBackgroundColor ` , and ` textColor ` props may also be used.
207207
208- The ` "campaign" ` variant is special in that it has both a background and foreground.
209- We understand that this naming can be confusing, but it helps to think of this
210- variant having two layers.
208+ The ` "campaign" ` variant is special in that it has both a foreground and a
209+ background and it helps to think of this variant having two layers.
210+
211+ #### Foreground
211212
212213To modify the foreground, the ` textBackgroundColor ` , ` textColor ` , and
213214` imageProps ` props should be used.
@@ -298,78 +299,120 @@ To modify the foreground, the `textBackgroundColor`, `textColor`, and
298299` }
299300 language = " jsx"
300301/>
301- #### isDarkBackgroundImage
302+ #### Background
303+
304+ To modify the background, either the ` backdropBackgroundColor ` or
305+ ` backgroundImageSrc ` prop should be used. If both are set, the
306+ ` backgroundImageSrc ` prop will take precedence.
307+
308+ For clarification, the component background is sometimes referred to as the
309+ "backdrop."
310+
311+ ##### backdropBackgroundColor
312+
313+ The ` backdropBackgroundColor ` prop is used to set the background color behind
314+ the featured image and text content. It is recommended to use DS color design
315+ tokens to set this value.
316+
317+ ##### backgroundImageSrc
318+
319+ The ` backgroundImageSrc ` prop is used to set a background image behind the
320+ featured image and text content.
321+
322+ For additional configuration, the ` isDarkBackgroundImage ` and
323+ ` isBlurredBackgroundImage ` props can be used to control the color and blur
324+ treatment of the background image.
325+
326+ If ` isDarkBackgroundImage ` is true, the background image will be converted to
327+ black & ; white and darkened moderately.
302328
303- The ` isDarkBackgroundImage ` prop can be used in the ` "campaign" ` hero to toggle
304- the visual treatment of the background image. If true, the background image will
305- be converted to black & white and darkened to 60% black.
329+ If ` isBlurredBackgroundImage ` is true, the background image will be blurred
330+ heavily and darkened slightly.
306331
307- <Story of = { HeroStories .CampaignDarkBackgroundImage } />
332+ These two props may be used independently or together to achieve the desired
333+ background treatment.
334+
335+ <Story of = { HeroStories .CampaignBackgroundTreatment } />
308336
309337<Source
310338 code = { `
311339 <Hero
312- backgroundImageSrc="https://iiif.nypl.org/iiif/2/5164274/full/!900,900/0/default.jpg "
340+ backdropBackgroundColor="section.research.primary "
313341 heading={
314342 <Heading
315343 level="h1"
316- id="campaign-hero-default-heading"
317344 text="Hero Campaign"
318345 />
319346 }
320347 imageProps={
321348 alt: "Image example",
322- src: "https://iiif.nypl.org/iiif/2/5164274/full/!900,900/0/default.jpg",
349+ src: "https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90",
350+ }
351+ subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
352+ variant="campaign"
353+ />
354+ ` }
355+ language = " jsx"
356+ />
357+ <Source
358+ code = { `
359+ <Hero
360+ backgroundImageSrc="https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90"
361+ heading={
362+ <Heading
363+ level="h1"
364+ text="Hero Campaign"
365+ />
366+ }
367+ imageProps={
368+ alt: "Image example",
369+ src: "https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90",
323370 }
324371 isDarkBackgroundImage
325- subHeaderText={
326- <>
327- With 92 locations across the Bronx, Manhattan, and Staten Island,{" "}
328- <Link href="https://www.nypl.org/locations/snfl/childrens">
329- The New York Public Library
330- </Link>{" "}
331- is an essential part of neighborhoods across the city. Visit us today.
332- </>
372+ subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
373+ variant="campaign"
374+ />
375+ ` }
376+ language = " jsx"
377+ />
378+ <Source
379+ code = { `
380+ <Hero
381+ backgroundImageSrc="https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90"
382+ heading={
383+ <Heading
384+ level="h1"
385+ text="Hero Campaign"
386+ />
333387 }
388+ imageProps={
389+ alt: "Image example",
390+ src: "https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90",
391+ }
392+ isBlurredBackgroundImage
393+ subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
334394 variant="campaign"
335395 />
336396` }
337397 language = " jsx"
338398/>
339-
340- #### backdropBackgroundColor
341-
342- The "backdrop" is what we call the background and that can be set through either
343- the ` backdropBackgroundColor ` or ` backgroundImageSrc ` props. When both are set,
344- the ` backgroundImageSrc ` will take precedence.
345-
346- <Story of = { HeroStories .CampaignBackgroundColors } />
347-
348399<Source
349400 code = { `
350401 <Hero
351- backdropBackgroundColor="section.research.primary "
402+ backgroundImageSrc="https://www.nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90 "
352403 heading={
353404 <Heading
354405 level="h1"
355- id="campaign-hero-long-text-heading"
356406 text="Hero Campaign"
357407 />
358408 }
359409 imageProps={
360410 alt: "Image example",
361- src: "https://images .nypl.org/index.php?id=swope_244712&t=w ",
411+ src: "https://www .nypl.org/scout/_next/image?url=https%3A%2F%2Fdrupal.nypl.org%2Fsites-drupal%2Fdefault%2Ffiles%2Fstyles%2F2_1_960%2Fpublic%2F2023-04%2F2023_04_17_030%2520%25281%2529.jpg%3Fh%3Dc9a3a702%26itok%3DZIuDnI6f&w=2048&q=90 ",
362412 }
413+ isBlurredBackgroundImage
363414 isDarkBackgroundImage
364- subHeaderText={
365- <>
366- With 92 locations across the Bronx, Manhattan, and Staten Island,{" "}
367- <Link href="https://www.nypl.org/locations/snfl/childrens">
368- The New York Public Library
369- </Link>{" "}
370- is an essential part of neighborhoods across the city. Visit us today.
371- </>
372- }
415+ subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
373416 variant="campaign"
374417 />
375418` }
0 commit comments