usePressFeedback
@astryxdesign/core v0.7.1 · usePressFeedback
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
options.hasOverlay | boolean | true | Whether to bring the default press paint (the astryx-pressable class, a layer on ::after). Pass false when the component paints the press itself from --_press-paint-image and only needs the marker. |
Returns
| Name | Type | Description |
|---|---|---|
pressableProps | Record<string, string> | Spread with v-bind on the element that paints the press: the data-astryx-pressable marker, plus class: 'astryx-pressable' by default. Under a finger the controller writes data-astryx-press="on" while the press is believed and "fading" for the release. The default style paints --astryx-color-overlay-pressed at the press's strength on the first frame and fades it over 200 ms, keeping :active for a mouse. |