Skip to content

Commit 5389eb2

Browse files
authored
docs(ui5-li): clarify usage and limitations of default slot (#11492)
Fixes: #11489
1 parent de188c2 commit 5389eb2

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/main/src/ListItemStandard.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,14 @@ type ExpandableTextTemplate = (this: ListItemStandard, params: ExpandableTextTem
4242
* @csspart delete-button - Used to style the button rendered when the list item is in delete mode
4343
* @csspart radio - Used to style the radio button rendered when the list item is in single selection mode
4444
* @csspart checkbox - Used to style the checkbox rendered when the list item is in multiple selection mode
45-
* @slot {Node[]} default - Defines the text of the component.
45+
* @slot {Node[]} default - Defines the custom formatted text of the component.
4646
*
47-
* **Note:** Although this slot accepts HTML Elements, it is strongly recommended that you only use text in order to preserve the intended design. <br/>
48-
* **Note:** Deprecated since version `2.10.0`. Use the `text` property instead. <br/>
49-
* Only use the default slot if you need to apply custom text formatting with HTML elements (like `<b>`, `<i>`, etc.).
47+
* **Note:** For optimal text wrapping and a consistent layout, it is strongly recommended to use the `text` property.
48+
*
49+
* Use the `default` slot only when custom formatting with HTML elements (e.g., `<b>`, `<i>`) is required.
50+
* Be aware that wrapping (via `wrappingType="Normal"`) may not function correctly with custom HTML content in the `default` slot.
51+
*
52+
* If both `text` and `default` slot are used, the `text` property takes precedence.
5053
* @constructor
5154
* @extends ListItem
5255
* @public

0 commit comments

Comments
 (0)