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
|`src`|`object`| An object with keys of responsive keys. See examples above.|
91
90
92
91
### Layout
93
92
94
-
| Prop | Type | Description
95
-
| -- | -- | --
96
-
| `expand` | `boolean` | Make the Visual fill it's container via CSS using absolute positioning.
97
-
| `aspect` | `number` | Force the Visual to a specific aspect ratio. If empty, this will be set using width and height fields from Contentful queries.
98
-
| `width` | `number`, `string` | A CSS dimension value or a px number.
99
-
| `height` | `number`, `string` | A CSS dimension value or a px number.
100
-
| `fit` | `string` | An [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) value that is applied to the assets. Defaults to `cover`.
101
-
| `position` | `string` | An [`object-position`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) value.
|`expand`|`boolean`| Make the Visual fill it's container via CSS using absolute positioning.|
96
+
|`aspect`|`number`| Force the Visual to a specific aspect ratio. If empty, this will be set using width and height fields from Contentful queries.|
97
+
|`width`|`number`, `string`| A CSS dimension value or a px number.|
98
+
|`height`|`number`, `string`| A CSS dimension value or a px number.|
99
+
|`fit`|`string`| An [`object-fit`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-fit) value that is applied to the assets. Defaults to `cover`.|
100
+
|`position`|`string`| An [`object-position`](https://developer.mozilla.org/en-US/docs/Web/CSS/object-position) value.|
102
101
103
102
### Loading
104
103
105
-
| Prop | Type | Description
106
-
| -- | -- | --
107
-
| `priority` | `boolean` | Sets [`next/image`'s `priority`](https://nextjs.org/docs/pages/api-reference/components/image#priority) and videos to not lazy load.
|`priority`|`boolean`| Sets [`next/image`'s `priority`](https://nextjs.org/docs/pages/api-reference/components/image#priority) and videos to not lazy load. |
| `paused` | `boolean` | Disables autoplay of videos. This prop is reactive, unlike the `paused` property of the html `<video>` tag. You can set it to `true` to pause a playing video or set it to `false` to play a paused video.
116
-
| `onPause` | `Function` | Invoked whenever the video fires a [pause event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event).
117
-
| `onPlay` | `Function` | Invoked whenever the video fires a [play event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event).
118
-
| `playIcon` | `ComponentType` | Replace the play icon used with accessibility controls.
119
-
| `pauseIcon` | `ComponentType` | Replace the pause icon used with accessibility controls.
|`paused`|`boolean`| Disables autoplay of videos. This prop is reactive, unlike the `paused` property of the html `<video>` tag. You can set it to `true` to pause a playing video or set it to `false` to play a paused video.|
114
+
|`onPause`|`Function`| Invoked whenever the video fires a [pause event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/pause_event).|
115
+
|`onPlay`|`Function`| Invoked whenever the video fires a [play event](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/play_event).|
116
+
|`playIcon`|`ComponentType`| Replace the play icon used with accessibility controls.|
117
+
|`pauseIcon`|`ComponentType`| Replace the pause icon used with accessibility controls.|
120
118
121
119
### Accessibility
122
120
123
-
| Prop | Type | Description
124
-
| -- | -- | --
125
-
| `alt` | `string` | Sets the alt attribute or aria-label value, depending on asset type.
126
-
| `hideAccessibilityControls` | `boolean` | Removes the play/pause toggle on videos.
127
-
| `accessibilityControlsPosition` | [`PositionOption`](https://github.com/BKWLD/react-visual/blob/eaf2d150efa1187033ba732a350a4db20f260435/packages/react/src/types/reactVisualTypes.ts#L61-L70) | Controls the position of the accessibility controls. Defaults to `bottom left`.
|`alt`|`string`| Sets the alt attribute or aria-label value, depending on asset type.|
124
+
|`hideAccessibilityControls`|`boolean`| Removes the play/pause toggle on videos.|
125
+
|`accessibilityControlsPosition`|[`PositionOption`](https://github.com/BKWLD/react-visual/blob/eaf2d150efa1187033ba732a350a4db20f260435/packages/react/src/types/reactVisualTypes.ts#L61-L70)| Controls the position of the accessibility controls. Defaults to `bottom left`.|
128
126
129
127
### Theming
130
128
131
-
| Prop | Type | Description
132
-
| -- | -- | --
133
-
| `className` | `string` | Add a custom CSS class.
0 commit comments