diff --git a/src/steps/internal.tsx b/src/steps/internal.tsx
index f8006950be..27209879d3 100644
--- a/src/steps/internal.tsx
+++ b/src/steps/internal.tsx
@@ -37,18 +37,35 @@ const CustomStep = ({
}) => {
const { status, statusIconAriaLabel } = step;
const { header, details, icon } = renderStep(step);
+ const iconNode = icon ? icon : ;
+
+ if (orientation === 'horizontal') {
+ return (
+
+
+ {iconNode}
+
+
+ {header}
+ {details && {details}
}
+
+ );
+ }
+
+ // Vertical orientation: render the icon and the connector together in a column-1 "rail" so the
+ // connector starts directly beneath the icon and stretches the full height of the step. Unlike
+ // placing the header in the same row as the icon, this keeps the vertical line continuous even
+ // when the custom header wraps onto multiple lines.
return (
-
-
- {icon ? icon : }
- {orientation === 'vertical' ? header :
}
-
- {orientation === 'vertical' ? (
+
+
+ {iconNode}
- ) : (
-
{header}
- )}
- {details &&
{details}
}
+
+
+
{header}
+ {details &&
{details}
}
+
);
};
diff --git a/src/steps/styles.scss b/src/steps/styles.scss
index 7f7f9b7c80..238fe8ab5f 100644
--- a/src/steps/styles.scss
+++ b/src/steps/styles.scss
@@ -116,3 +116,42 @@
}
}
}
+
+// Vertical custom steps: a column-1 "rail" stacks the icon above a connector that grows to fill
+// the full height of the step (header + details), keeping the vertical line continuous and
+// connecting consecutive steps regardless of header height. Placed after `.horizontal` so
+// selectors stay in ascending specificity order.
+.root > .list > .container.custom-vertical {
+ // The rail stretches to the row height (default `align-items: stretch`), which is driven by the
+ // content column, so the connector always spans the full step.
+ > .rail {
+ grid-column: 1;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+
+ > .connector {
+ grid-row: auto;
+ grid-column: auto;
+ flex: 1 1 auto;
+ background-color: awsui.$color-border-divider-default;
+ border-block: 0;
+ border-inline: 0;
+ inline-size: awsui.$border-divider-list-width;
+ block-size: auto;
+ min-block-size: awsui.$space-static-xs;
+ inset-inline-end: 0;
+ margin-block: awsui.$space-static-xxs 0;
+ }
+ }
+
+ > .content {
+ grid-column: 2;
+ // Allow long header/details text to wrap instead of stretching the grid column.
+ min-inline-size: 0;
+ }
+}
+
+.root > .list > .container.custom-vertical:last-of-type > .rail > .connector {
+ display: none;
+}