@@ -21,17 +21,17 @@ A foundational component that provides a standardized layout and styling for ite
2121
2222---
2323
24- ### Properties
24+ ## Properties
2525
2626<Controls of = { ItemBaseStories .Default } />
2727
2828### Base Properties
2929
3030Supports [ Base properties] ( /BaseProperties )
3131
32- ### Styling Properties
32+ ## Styling
3333
34- #### styles
34+ ### styles
3535
3636Customizes the root element of the component.
3737
@@ -45,11 +45,11 @@ Customizes the root element of the component.
4545
4646### Style Properties
4747
48- These properties allow direct style application without using the ` styles ` prop: ` width ` , ` height ` , ` padding ` , ` margin ` , ` color ` , ` fill ` , ` opacity ` , ` display ` , ` position ` , ` zIndex ` , ` gap ` , ` flow ` , ` placeItems ` , ` placeContent ` , ` alignItems ` , ` justifyContent ` , ` border ` , ` radius ` , ` shadow ` , ` overflow ` .
48+ Direct style application without using the ` styles ` prop: ` width ` , ` height ` , ` padding ` , ` margin ` , ` color ` , ` fill ` , ` opacity ` , ` display ` , ` position ` , ` zIndex ` , ` gap ` , ` flow ` , ` placeItems ` , ` placeContent ` , ` alignItems ` , ` justifyContent ` , ` border ` , ` radius ` , ` shadow ` , ` overflow ` .
4949
5050### Modifiers
5151
52- The ` mods ` property accepts the following modifiers you can override :
52+ The ` mods ` property accepts the following modifiers:
5353
5454| Modifier | Type | Description |
5555| ----------| ------| -------------|
@@ -138,14 +138,49 @@ The `mods` property accepts the following modifiers you can override:
138138< / ItemBase>
139139```
140140
141- ### With Auto Tooltip
141+ ### With Tooltip
142+
143+ By default, ItemBase shows an auto tooltip when content overflows.
144+
145+ ** Type:** ` string | boolean | object `
146+
147+ ** Values:**
148+ - ` true ` (default) - Shows tooltip with item content when text overflows
149+ - ` false ` - Disables tooltip entirely
150+ - ` string ` - Shows tooltip with the specified text (always visible, not auto)
151+ - ` object ` - Advanced configuration:
152+ - ` title?: string ` - Custom tooltip text (when provided, always shows tooltip unless ` auto: true ` )
153+ - ` auto?: boolean ` - Enable/disable auto overflow behavior (defaults to ` true ` when no ` title ` is provided)
154+ - ` placement?: string ` - Tooltip position (top, bottom, left, right, etc.)
155+ - Plus other [ TooltipProvider props] ( /docs/overlays-tooltip--docs )
142156
143157``` jsx
158+ {/* Auto tooltip on overflow (default) */ }
159+ < ItemBase style= {{ width: ' 200px' }}>
160+ This is a very long text that will show a tooltip when overflowed
161+ < / ItemBase>
162+
163+ {/* Disable tooltip */ }
164+ < ItemBase tooltip= {false } style= {{ width: ' 200px' }}>
165+ This text will be truncated without a tooltip
166+ < / ItemBase>
167+
168+ {/* Always show custom tooltip */ }
169+ < ItemBase tooltip= {{ title: ' Custom tooltip text' }}>
170+ Hover to see custom tooltip
171+ < / ItemBase>
172+
173+ {/* Auto tooltip with custom placement */ }
174+ < ItemBase tooltip= {{ placement: ' right' }} style= {{ width: ' 200px' }}>
175+ Long text with tooltip on the right when overflowed
176+ < / ItemBase>
177+
178+ {/* Custom tooltip only on overflow */ }
144179< ItemBase
145- tooltip= {true }
180+ tooltip= {{ title : ' Custom overflow tooltip ' , auto : true } }
146181 style= {{ width: ' 200px' }}
147182>
148- This is a very long text that will show a tooltip when overflowed
183+ This shows custom tooltip only when text overflows
149184< / ItemBase>
150185```
151186
@@ -178,10 +213,10 @@ The `mods` property accepts the following modifiers you can override:
178213 < ItemBase icon= {< IconUser / > }> User Profile< / ItemBase>
179214 ```
180215
181- 2 . ** Do** : Provide tooltips for items that might overflow
216+ 2 . ** Do** : Use descriptions to provide additional context
182217 ``` jsx
183- < ItemBase tooltip = { true } style = {{ width : ' 200px ' }} >
184- Long item name that might be truncated
218+ < ItemBase icon = { < IconFile / > } description = " Last edited 2 hours ago " >
219+ Document . pdf
185220 < / ItemBase>
186221 ```
187222
0 commit comments