Skip to content

Commit 741eed4

Browse files
Merge branch 'release' into gh-pages
2 parents 0e27d2a + 6b8ea44 commit 741eed4

File tree

13 files changed

+362
-83
lines changed

13 files changed

+362
-83
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ Currently, this repo is in Prerelease. When it is released, this project will ad
88

99
## Prerelease
1010

11+
## 4.1.4 (February 26, 2026)
12+
13+
### Updates
14+
15+
- Updates the `StatusBadge` component to allow the label text to wrap onto multiple lines.
16+
- Updates the `Hero` component to add the `isBlurredBackgroundImage` prop for applying a blur effect to the background image in the "campaign" variant.
17+
1118
## 4.1.3 (February 12, 2026)
1219

1320
### Updates

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@nypl/design-system-react-components",
3-
"version": "4.1.3",
3+
"version": "4.1.4",
44
"description": "NYPL Reservoir Design System React Components",
55
"repository": {
66
"type": "git",

src/components/Hero/Hero.mdx

Lines changed: 84 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -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

212213
To 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 &amp; 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
`}

src/components/Hero/Hero.stories.tsx

Lines changed: 74 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ const imageProps = {
5959
alt: "Image example",
6060
src: getPlaceholderImage(),
6161
};
62+
const imagePropsColorful = {
63+
alt: "Colorful image example",
64+
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",
65+
};
6266

6367
const meta: Meta<typeof Hero> = {
6468
title: "Components/Basic Elements/Hero",
@@ -69,6 +73,10 @@ const meta: Meta<typeof Hero> = {
6973
foregroundColor: { control: { type: "color" } },
7074
heading: { control: false },
7175
imageProps: { control: false },
76+
isBlurredBackgroundImage: {
77+
control: { type: "boolean" },
78+
table: { defaultValue: { summary: "false" } },
79+
},
7280
isDarkBackgroundImage: {
7381
control: { type: "boolean" },
7482
table: { defaultValue: { summary: "false" } },
@@ -104,6 +112,7 @@ export const WithControls: Story = {
104112
imageProps,
105113
"imageProps.alt": "",
106114
"imageProps.src": "",
115+
isBlurredBackgroundImage: undefined,
107116
isDarkBackgroundImage: undefined,
108117
isDarkText: undefined,
109118
subHeaderText: undefined,
@@ -235,7 +244,7 @@ export const Campaign: Story = {
235244
text="Campaign Hero at Default Height"
236245
/>
237246
<Hero
238-
backgroundImageSrc={getPlaceholderImage()}
247+
backgroundImageSrc="https://iiif.nypl.org/iiif/2/5164274/full/!900,900/0/default.jpg"
239248
variant="campaign"
240249
heading={
241250
<Heading
@@ -280,23 +289,73 @@ export const Campaign: Story = {
280289
</Stack>
281290
),
282291
};
283-
export const CampaignDarkBackgroundImage: Story = {
292+
293+
export const CampaignBackgroundTreatment: Story = {
284294
render: () => (
285-
<Hero
286-
backgroundImageSrc="https://iiif.nypl.org/iiif/2/5164274/full/!900,900/0/default.jpg"
287-
variant="campaign"
288-
heading={
295+
<Stack spacing="l">
296+
<Stack spacing="s">
297+
<Heading level="h3" size="heading8" text="Backdrop background color" />
298+
<Hero
299+
backdropBackgroundColor="ui.warning.secondary"
300+
variant="campaign"
301+
heading={<Heading level="h1" mb="s" text="Hero Campaign" />}
302+
imageProps={imagePropsColorful}
303+
subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
304+
/>
305+
</Stack>
306+
<Stack spacing="s">
307+
<Heading level="h3" size="heading8" text="Dark background image" />
308+
<Hero
309+
backgroundImageSrc={imagePropsColorful.src}
310+
variant="campaign"
311+
heading={<Heading level="h1" mb="s" text="Hero Campaign" />}
312+
imageProps={imagePropsColorful}
313+
isDarkBackgroundImage
314+
subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
315+
/>
316+
</Stack>
317+
<Stack spacing="s">
318+
<Heading level="h3" size="heading8" text="Blurred background image" />
319+
<Hero
320+
backgroundImageSrc={imagePropsColorful.src}
321+
variant="campaign"
322+
heading={<Heading level="h1" mb="s" text="Hero Campaign" />}
323+
imageProps={imagePropsColorful}
324+
isBlurredBackgroundImage
325+
subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
326+
/>
327+
</Stack>
328+
<Stack spacing="s">
289329
<Heading
290-
level="h1"
291-
id="campaign-hero-default-heading"
292-
mb="s"
293-
text="Hero Campaign"
330+
level="h3"
331+
size="heading8"
332+
text="Dark and blurred background image"
294333
/>
295-
}
296-
imageProps={imageProps}
297-
isDarkBackgroundImage
298-
subHeaderText={otherSubHeaderText}
299-
/>
334+
<Hero
335+
backgroundImageSrc={imagePropsColorful.src}
336+
variant="campaign"
337+
heading={<Heading level="h1" mb="s" text="Hero Campaign" />}
338+
imageProps={imagePropsColorful}
339+
isBlurredBackgroundImage
340+
isDarkBackgroundImage
341+
subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
342+
/>
343+
</Stack>
344+
<Stack spacing="s">
345+
<Heading
346+
level="h3"
347+
size="heading8"
348+
text="Unstyled background image (for comparison)"
349+
/>
350+
<Hero
351+
backgroundImageSrc={imagePropsColorful.src}
352+
variant="campaign"
353+
heading={<Heading level="h1" mb="s" text="Hero Campaign" />}
354+
imageProps={imagePropsColorful}
355+
subHeaderText="Nullam id dolor id nibh ultricies vehicula ut id elit. Sed posuere consectetur est at lobortis."
356+
/>
357+
</Stack>
358+
</Stack>
300359
),
301360
};
302361
export const CampaignBackgroundColors: Story = {

0 commit comments

Comments
 (0)