Overriding the design
Copy-ready recipes. Each one shows the setting to change first, then the prop, then the CSS. Use the first that does the job: settings show without a deploy and the site's owner can change them later.
Two rules. Never use !important, because your normal CSS already beats the feed's. And give the component a class,
like class="site-feed", so your CSS can find it.
- Square corners
- A three-column grid
- No snapping
- Captions under each tile
- A dark site with an accent colour
- A club strip, with settings only
- The site's fonts and headings
- If your CSS doesn't apply
- Example prompts
Square corners
Tiles, buttons and the arrows below the posts all follow the corner radius.
Setting
Corners: 0. In the API, "radius": 0.
Prop
<SocialFeed feed="your-feed-id" radius={0} />CSS
.site-feed {
--nsf-radius: 0;
--nsf-button-radius: 0; /* only for a pill Follow button */
}
A three-column grid
A grid wraps into rows. Columns are whole tiles, so 3.5 becomes 3.
Setting
Layout: Grid. Tiles across: 2 on phones, 3 on tablets, 3 on desktops. Posts: 6 or 9, so the rows are full.
Prop
<SocialFeed feed="your-feed-id" layout="grid" posts={6} columns={{ phone: 2, tablet: 3, desktop: 3 }} />CSS
/* 3 across at every width. The layout still has to be grid. */
.site-feed {
--nsf-columns: 3;
}
On the embed: data-layout="grid" data-columns-tablet="3" data-columns-desktop="3".
No snapping
A strip or carousel normally comes to rest on a whole tile. This lets it stop anywhere.
Setting
Snapping: Off. In the API, "snap": "none".
Prop
<SocialFeed feed="your-feed-id" snap="none" />CSS
.site-feed .nsf-feed__track {
scroll-snap-type: none;
}
Captions under each tile
Captions are shown without hashtags, cut off after a number of lines.
Setting
Captions: Below. Caption lines: 3.
Prop
<SocialFeed feed="your-feed-id" captions="below" captionLines={3} />CSS
.site-feed {
--nsf-caption-size: 0.8125rem;
--nsf-caption-font: var(--font-body);
}
.site-feed .nsf-feed__caption {
color: var(--text-muted);
}
A dark site with an accent colour
The feed takes its text colour from the page. On a site with color-scheme: dark, the arrows already follow, and the lightbox takes the page's background.
Setting
Accent colour: your brand colour, like #2cf08b. It colours the Instagram icon, hovers and focus rings.
Prop
<SocialFeed feed="your-feed-id" accent="#2cf08b" />CSS
.site-feed {
color: #eceef1;
--nsf-accent: #2cf08b;
--nsf-tile-bg: #1b1d21;
--nsf-border: #30333a;
--nsf-arrow-bg: #1b1d21;
--nsf-arrow-fg: #eceef1;
--nsf-muted: #a9adb5;
}
A club strip, with settings only
An Instagram icon and a section heading, an intro line, an outlined Follow button, tall tiles that show each whole image in a thin border, a lift on hover, and arrows below. No code beyond placing the feed. Set these in the admin and save them as a look called "Club strip":
| Setting | Value |
|---|---|
layout | "strip" |
columns | {"phone": 1.6, "tablet": 3, "desktop": 4} |
gap | 16 |
radius | 4 |
shape | "portrait" |
fit | "contain" |
border | true |
hover | "lift" |
arrows | "always" |
arrows_position | "below" |
scroll_by | "tile" |
header | "icon" |
heading | "h2" |
title | "Life at the club" |
subtitle | "Training, events and the people who make it" |
follow | "header" |
follow_style | "button" |
follow_label | "Follow us" |
accent | "#b08d3c" |
Then place it:
<SocialFeed feed="your-feed-id" look="Club strip" />
<div data-social-feed="your-feed-id" data-look="club-strip"></div>
The same as props, if it's only for one placement:
<SocialFeed
feed="your-feed-id"
header="icon" heading="h2" title="Life at the club"
subtitle="Training, events and the people who make it"
followStyle="button" follow="Follow us"
shape="portrait" fit="contain" border radius={4} gap={16}
columns={{ phone: 1.6, tablet: 3, desktop: 4 }}
hover="lift" arrows="always" arrowsPosition="below" scrollBy="tile"
accent="#b08d3c"
/>
The site's fonts and headings
With an h2 or h3 heading, the site's own heading styles apply. With a p heading, the tokens set it.
Setting
Heading element: h2. The feed's heading then looks like the site's other section headings.
Prop
<SocialFeed feed="your-feed-id" heading="h2" title="On Instagram" />CSS
.site-feed {
font-family: var(--font-body);
--nsf-title-font: var(--font-display);
--nsf-title-size: 1.5rem;
}
If your CSS doesn't apply
-
Astro's scoped styles don't reach the feed, because its markup comes from the component. Use
:global(.site-feed)in a scoped style, or put the rules in a global stylesheet. -
Your CSS is in a cascade layer, as Tailwind 4's is. The component adds the feed's layer later in the page,
so it would win. Put this at the very top of your main stylesheet, before any
@import, so the feed's layer comes first:@layer nsf; - A setting seems stuck. The site keeps the feed for 60 seconds, unless the change was saved in this site's own admin, which shows it on the next reload. Elsewhere in the world Social Feeds can keep the old copy for up to 5 minutes. A prop or your CSS always beats the setting.
- Columns do nothing. Check the layout. In a strip, columns is how many tiles show at once, not rows.
Example prompts
For Claude Code or another coding agent, with this site open. Each is followed by the change to expect.
| Prompt | Expected change |
|---|---|
| Make the Instagram feed a 3-column grid with no rounded corners and no arrows. | layout="grid" columns={{ phone: 2, tablet: 3, desktop: 3 }} radius={0}. A grid has no arrows. |
| Put the Instagram feed above the footer on every page, matching the footer's colours. | The component in the footer layout, with --nsf-* tokens set from the footer's colours. |
| Show captions under the posts, two lines at most, in our body font. | captions="below" captionLines={2} and --nsf-caption-font. |
| Use the Gallery grid look on the gallery page. | look="Gallery grid" on that page's component. |
| Make the feed's heading look like our other section headings. | heading="h2", or the site's heading markup in the header slot. |
Agents work best from the plain text reference.