\ No newline at end of file
diff --git a/packages/fiori/src/DynamicPageTitle.ts b/packages/fiori/src/DynamicPageTitle.ts
index 4c25fa163740..acf37be2a2bf 100644
--- a/packages/fiori/src/DynamicPageTitle.ts
+++ b/packages/fiori/src/DynamicPageTitle.ts
@@ -13,6 +13,8 @@ import type Toolbar from "@ui5/webcomponents/dist/Toolbar.js";
import type { ToolbarMinWidthChangeEventDetail } from "@ui5/webcomponents/dist/Toolbar.js";
import ToolbarItemOverflowBehavior from "@ui5/webcomponents/dist/types/ToolbarItemOverflowBehavior.js";
import { isDesktop } from "@ui5/webcomponents-base/dist/Device.js";
+import Icon from "@ui5/webcomponents/dist/Icon.js";
+import Title from "@ui5/webcomponents/dist/Title.js";
// Template
import DynamicPageTitleTemplate from "./generated/templates/DynamicPageTitleTemplate.lit.js";
@@ -63,6 +65,7 @@ import {
renderer: litRender,
styles: DynamicPageTitleCss,
template: DynamicPageTitleTemplate,
+ dependencies: [Title, Icon],
})
/**
@@ -110,6 +113,13 @@ class DynamicPageTitle extends UI5Element {
@property({ type: Number })
minActionsWidth?: number;
+ /**
+ * Indicates whether the title has snapped on mobile devices.
+ * @private
+ */
+ @property({ type: Boolean })
+ hasSnappedTitleOnMobile = false;
+
/**
* Defines the content of the Heading of the Dynamic Page.
*
@@ -132,6 +142,22 @@ class DynamicPageTitle extends UI5Element {
@slot({ type: HTMLElement })
snappedHeading!: HTMLElement[];
+ /**
+ * Defines the content of the snapped title on mobile devices.
+ *
+ * This slot is displayed only when the `DynamicPageTitle` is in the snapped state on mobile devices.
+ * It should be used to provide a simplified, single-line title that takes up less space on smaller screens.
+ *
+ * **Note:**
+ * - The content set in this slot **overrides** all other content set in the `DynamicPageTitle` slots when displayed.
+ * - The slot is intended for a single `ui5-title` component.
+ *
+ * @public
+ * @since 2.3.0
+ */
+ @slot({ type: HTMLElement })
+ snappedTitleOnMobile!: Array;
+
/**
* Defines the bar with actions in the Dynamic page title.
*
diff --git a/packages/fiori/src/themes/DynamicPage.css b/packages/fiori/src/themes/DynamicPage.css
index 93db2137cae4..c4415e41418b 100644
--- a/packages/fiori/src/themes/DynamicPage.css
+++ b/packages/fiori/src/themes/DynamicPage.css
@@ -126,4 +126,11 @@
:host([media-range="XL"]) ::slotted([slot="headerArea"]) {
padding: var(--_ui5_dynamic_page_header_padding_XL);
+}
+
+/* snappedTitleOnMobile */
+:host([_header-snapped]) ::slotted([slot="headerArea"]) {
+ height: 0;
+ padding: 0;
+ visibility: hidden;
}
\ No newline at end of file
diff --git a/packages/fiori/src/themes/DynamicPageTitle.css b/packages/fiori/src/themes/DynamicPageTitle.css
index e1159a671714..3c2f875b9c27 100644
--- a/packages/fiori/src/themes/DynamicPageTitle.css
+++ b/packages/fiori/src/themes/DynamicPageTitle.css
@@ -35,6 +35,11 @@
box-shadow: var(--sapContent_HeaderShadow);
}
+:host([has-snapped-title-on-mobile]) {
+ min-height: var(--_ui5_dynamic_page_snapped_title_on_mobile_min_height);
+ line-height: var(--_ui5_dynamic_page_snapped_title_on_mobile_line_height);
+}
+
/* breadcrumbs */
::slotted([ui5-breadcrumbs][slot="breadcrumbs"]) {
padding: var(--_ui5_dynamic_page_title_breadcrumbs_padding_top) 0
@@ -88,6 +93,13 @@
min-width: 1px;
}
+.ui5-dynamic-page--snapped-title-on-mobile {
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ pointer-events: none;
+}
+
.ui5-dynamic-page-title--content {
padding: 0 0 0 1rem;
flex-shrink: 1.6;
diff --git a/packages/fiori/src/themes/base/DynamicPageTitle-parameters.css b/packages/fiori/src/themes/base/DynamicPageTitle-parameters.css
index eebbce124b13..c6f0fabc51ab 100644
--- a/packages/fiori/src/themes/base/DynamicPageTitle-parameters.css
+++ b/packages/fiori/src/themes/base/DynamicPageTitle-parameters.css
@@ -16,4 +16,6 @@
--_ui5_dynamic_page_title_hover_background: var(--sapObjectHeader_Hover_Background);
+ --_ui5_dynamic_page_snapped_title_on_mobile_line_height: 2rem;
+ --_ui5_dynamic_page_snapped_title_on_mobile_min_height: 2rem;
}
\ No newline at end of file
diff --git a/packages/fiori/test/pages/DynamicPageWithSnappedTitleOnMobile.html b/packages/fiori/test/pages/DynamicPageWithSnappedTitleOnMobile.html
new file mode 100644
index 000000000000..0d30bc33fb3a
--- /dev/null
+++ b/packages/fiori/test/pages/DynamicPageWithSnappedTitleOnMobile.html
@@ -0,0 +1,207 @@
+
+
+
+
+
+
+ Dynamic page
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Man
+ Shoes
+ Running Shoes
+
+
+ Special Running Shoe
+
+ Snapped Title On Mobile
+
+