Address Card

Pro

Saved address card with a Home or Work label, default badge, contact details and an optional street-map tile. Picking one highlights the card and drops its pin on the map. Includes an add-new tile.

Preview

Installation

npx @lumioui/cli add pro/address-card

Usage

import { AddressMap, AddressCard } from "@/components/ui/address-card/address-card";
<AddressCard />

Also exported: AddressMap.

Examples

Add new

An address book that starts with one saved home, green.

Checkout summary

The "Shipping to" block on a furniture checkout review, neutral ink.

Pickup point

Choosing where to collect a parcel, in ink.

"Deliver to" in a grocery app, green.

API reference

AddressMap

Prop Type Default
seed number

Varies the street layout — give each address its own. Default 1.

1
active boolean

Pops the pin when it flips to true (selection).

false
showPin boolean

Hide the pin (a neutral backdrop). Default true.

true
className string —

AddressCard

Prop Type Default
label* string

"Home", "Work", "Mum's", "Parcel locker 14".

—
lines* readonly string[]

Street lines, one per row.

—
icon IconName

Glyph beside the label. Defaults by label (home → home, work → briefcase, else map-pin).

—
name string

Recipient.

—
contact string

Phone or email.

—
isDefault boolean —
defaultLabel string

Badge copy. Default "Default".

—
note string

Extra line — "Open until 9 pm", "Leave with the concierge".

—
noteTone "default" | "success" | "warning"

Note colour: success for open now, warning for closing soon. Default "default".

—
distance string

Trailing meta beside the label — "0.4 mi".

—
map "none" | "side" | "top"

Drawn map tile: beside the text, across the top, or none. Default "none".

—
mapSeed number

Street layout seed for the map tile.

—
selected boolean

Radio mode: selected state (controlled).

—
onSelect () => void

Radio mode: makes the whole card a radio.

—
onEdit () => void

Adds an Edit affordance.

—
editLabel string

Edit affordance copy. Default "Edit".

—
disabled boolean

Dims the card and blocks selection — out of delivery range.

—
className string —
children React.ReactNode —

AddressCardAdd

Prop Type Default
onPress () => void —
label string

Default "Add new address".

—
hint string

Second line — "Home, work or a pickup point".

—
className string —