You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guide/utils.md
+27-5Lines changed: 27 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Normally, you don't need to use it actively. See the [ListPopup](../components/l
50
50
51
51
## Overscroll Effects
52
52
53
-
Miuix provides easy-to-use overscroll effects for smoother and more natural scrolling experiences.
53
+
Miuix provides easy-to-use overscroll effects modifier for smoother and more natural scrolling experiences.
54
54
55
55
### Vertical Overscroll
56
56
@@ -105,6 +105,28 @@ LazyColumn(
105
105
*`springDamp`: Float, defines the spring damping for the rebound animation. Higher values result in less oscillation. Defaults to `1f`.
106
106
*`isEnabled`: A lambda expression returning a Boolean, used to dynamically control whether the overscroll effect is enabled. By default, it is enabled only on Android and iOS platforms.
107
107
108
+
109
+
## Scroll End Haptic Feedback
110
+
111
+
Miuix provides a `scrollEndHaptic` modifier to trigger haptic feedback when a scrollable container is flung to its start or end boundaries. This enhances the user experience by providing a tactile confirmation that the end of the list has been reached.
112
+
113
+
```kotlin
114
+
LazyColumn(
115
+
modifier =Modifier
116
+
.fillMaxSize()
117
+
// Add scroll end haptic feedback
118
+
.scrollEndHaptic(
119
+
hapticFeedbackType =HapticFeedbackType.LongPress// Default value
120
+
)
121
+
) {
122
+
// List content
123
+
}
124
+
```
125
+
126
+
**Parameter Explanation:**
127
+
128
+
*`hapticFeedbackType`: Specifies the type of haptic feedback to be performed when the scroll reaches its end. Defaults to `HapticFeedbackType.TextHandleMove`. You can use other types available in `androidx.compose.ui.hapticfeedback.HapticFeedbackType`.
129
+
108
130
## Press Feedback Effects
109
131
110
132
Miuix provides visual feedback effects to enhance user interaction experience, improving operability through tactile-like responses.
@@ -175,10 +197,10 @@ Box(
175
197
176
198
The `PressFeedbackType` enum defines different types of visual feedback that can be applied when the component is pressed.
177
199
178
-
| Type | Description |
179
-
|------|-------------|
180
-
| None | No visual feedback |
181
-
| Sink | Applies a sink effect, where the component scales down slightly when pressed |
0 commit comments