🚀 Ship faster with premium components 🚀
Search documentation v1.1.0

List with Images

Sequence of items paired with images, arranged in an alternating layout

Source Report Issue
Command docs
How to add this block to your project
npm run add ListWithImages

Use the ListWithImages component to display a sequence of items paired with images, arranged in an alternating left-right layout for visual balance and storytelling flow. They provide the following benefits:

Preview
Installing Astro UI library
Step 1 Setup
Install the Astro UI component library with a single command. Get started instantly without worrying about complex configurations.
Configuring Astro UI library
Step 2 Configure
Customize themes, tweak components, and integrate easily with your Astro project. Built to adapt to your brand and workflow.
Using Astro components
Final step Enjoy
Drop components directly into your Astro pages and enjoy a faster workflow with polished, accessible UI out of the box.
Unlock code
How to use the ListWithImages component in Astro
---
// Your import path to your icons might differ
// Icons are provided with the component
import terminalIcon from '@icons/terminal.svg?raw'
const listWithImageItems = [
{
badge: {
text: 'Step 1',
icon: terminalIcon,
theme: 'warning'
},
img: {
src: '/img/step-1.png',
alt: 'Installing Astro UI library',
width: 250,
height: 250
},
title: 'Setup',
description: 'Install the Astro UI component library...',
cta: {
text: 'Get Started ->',
href: '/get-started'
}
},
{ ... },
{ ... }
]
---
<ListWithImages items={listWithImageItems} />

The component expects an items prop that accepts an array of objects for the list items. Each list item can have the following properties:

Badges and Buttons

Badges and buttons are optional for the items, you can also create the component items with only an image, title and description. Regardless of the amount of content, elements will be vertically center-aligned with the image:

Installing Astro UI library
Setup
Install the Astro UI component library with a single command. Get started instantly without worrying about complex configurations.
Configuring Astro UI library
Configure
Customize themes, tweak components, and integrate easily with your Astro project. Built to adapt to your brand and workflow.
Using Astro components
Enjoy
Drop components directly into your Astro pages and enjoy a faster workflow with polished, accessible UI out of the box.

Alternate Layout

You can also switch the alternating order of the component by setting the secondary prop to true:

Installing Astro UI library
Step 1 Setup
Install the Astro UI component library with a single command. Get started instantly without worrying about complex configurations.
Configuring Astro UI library
Step 2 Configure
Customize themes, tweak components, and integrate easily with your Astro project. Built to adapt to your brand and workflow.
Using Astro components
Final step Enjoy
Drop components directly into your Astro pages and enjoy a faster workflow with polished, accessible UI out of the box.
Unlock code
How to change the order of alternating layout
<ListWithImages
items={listWithImageItems}
secondary={true}
/>

API

Unlock code
Component API reference
type ListWithImagesProps = {
items: {
badge?: {
text: string
icon?: string
} & BadgeProps
img: {
src: string
alt: string
width: number
height: number
lazy?: boolean
}
title: string
description: string
cta?: {
text?: string
icon?: string
} & ButtonProps
}[]
secondary?: boolean
className?: string
}
PropPurpose
items.badge Sets a badge above the title.
items.badge.text Sets the text for the badge.
items.badge.icon Sets an icon for the badge. You can pass SVG strings, or an icon type for Astro components.
items.img.src Sets the path for the list item image.
items.img.alt Sets an alternate text for the image.
items.img.width Sets the width of the image.
items.img.height Sets the height of the image.
items.img.lazy Set to true to enable lazy loading for the image.
items.title Sets a title for the item.
items.description Sets a description for item.
items.cta Sets a CTA button under the description.
items.cta.text Sets the label for the CTA.
items.cta.icon Sets an icon for the CTA. You can pass SVG strings, or an icon type for Astro components.
secondary Changes the order of the alternating layout.
className Pass additional CSS classes for the ListWithImages component.