Data displayGuaranteeStrip
Searchastronomic.dev# GuaranteeStrip
For a short row of promises with checks and one button, such as fixed price, on time and clean up, on the accent color.
Static: no JavaScript.
## Usage
```astro
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
```
## Examples
### Three promises
Up to three promises, each with a check in a round mark, then one button. From a 42rem strip they share one row; the strip's corners are the card's plus its padding, so the button's corners run parallel.
```astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import ArrowRight from "@lucide/astro/icons/arrow-right";
import { construction } from "../_data/groundcrew.ts";
---
<!-- Sixpenny Builders' three promises on the accent, with the button at the end. -->
<GuaranteeStrip items={construction.promises} action={construction.promiseAction} actionIconTile={ArrowRight} />
```
### Two promises
Two promises and a button with no icon tile.
```astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import { cleaning } from "../_data/groundcrew.ts";
---
<!-- Two promises and a button with no tile. -->
<GuaranteeStrip items={cleaning.promises.slice(0, 2)} action={cleaning.promiseAction} />
```
### In a narrow column
Long promises in a narrow column: the promises stack, each wraps, and the button fills the row.
```astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import ArrowRight from "@lucide/astro/icons/arrow-right";
---
<!-- Long promises in a narrow column: the list stacks and the button fills the row. -->
<div class="max-w-sm">
<GuaranteeStrip
items={[
"A flat price on a tablet before any work starts, and that is the price on the bill",
"The trip fee goes toward the repair if you go ahead the same day",
"Every repair has a 1-year labor warranty, in writing",
]}
action={{ label: "Book a visit with Brassfield Plumbing & Drain", href: "#quote" }}
actionIconTile={ArrowRight}
/>
</div>
```
## Props
### GuaranteeStrip
| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `items` | `string[]` | `[]` | Required. The promises, up to three short lines, such as "Fixed price in writing before we start". Blank lines are left out; with none, nothing renders. |
| `action` | `{ label: string; href: string }` | None | One button after the promises (Button tone="accent": an accent-fg fill with accent text). Shown with both a label and an href. |
| `actionIconTile` | `IconComponent` | None | Your icon component (an arrow), in a tile at the end of the button. Decoration. |
| `listClass` | `string` | None | More classes for the list of promises. |
| `class` | `string` | None | More classes for the strip, merged with cn(), so yours win on conflicts. |
Any other attribute goes on the strip's <div>.
## Accessibility
- The promises are a list (role="list" keeps it one in Safari when the bullets are gone), so a screen reader says how many there are.
- Each check mark is decoration, hidden from a screen reader: the list says what it is.
- On the accent, text is the accent's own text color and every focusable element shows an accent-fg ring, both checked in every preset.
- The button is a link that looks like one. Give it a label that says where it goes.
GuaranteeStrip
FreeFor a short row of promises with checks and one button, such as fixed price, on time and clean up, on the accent color.
- File
- GuaranteeStrip.astro
- Group
- Data display
- Kind
- Static: no JavaScript
- Examples
- 3
Examples
Drag the orange handle to set the width. Frames get real breakpoints.
- Static
- Interactive
- Framed
Three promises
Up to three promises, each with a check in a round mark, then one button. From a 42rem strip they share one row; the strip's corners are the card's plus its padding, so the button's corners run parallel.
This preview did not load.
main.astro
examples/guaranteestrip/main.astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import ArrowRight from "@lucide/astro/icons/arrow-right";
import { construction } from "../_data/groundcrew.ts";
---
<!-- Sixpenny Builders' three promises on the accent, with the button at the end. -->
<GuaranteeStrip items={construction.promises} action={construction.promiseAction} actionIconTile={ArrowRight} />Two promises
Two promises and a button with no icon tile.
This preview did not load.
two-items.astro
examples/guaranteestrip/two-items.astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import { cleaning } from "../_data/groundcrew.ts";
---
<!-- Two promises and a button with no tile. -->
<GuaranteeStrip items={cleaning.promises.slice(0, 2)} action={cleaning.promiseAction} />In a narrow column
Long promises in a narrow column: the promises stack, each wraps, and the button fills the row.
This preview did not load.
long.astro
examples/guaranteestrip/long.astro
---
import GuaranteeStrip from "@astronomic-dev/ui/components/GuaranteeStrip.astro";
import ArrowRight from "@lucide/astro/icons/arrow-right";
---
<!-- Long promises in a narrow column: the list stacks and the button fills the row. -->
<div class="max-w-sm">
<GuaranteeStrip
items={[
"A flat price on a tablet before any work starts, and that is the price on the bill",
"The trip fee goes toward the repair if you go ahead the same day",
"Every repair has a 1-year labor warranty, in writing",
]}
action={{ label: "Book a visit with Brassfield Plumbing & Drain", href: "#quote" }}
actionIconTile={ArrowRight}
/>
</div>Minimal · Light