UNPKG

@wix/design-system

Version:

@wix/design-system

58 lines (55 loc) 2.17 kB
### children - type: ReactNode - description: Accepts any component as `<MediaOverlay.Content>` content. Each element has the following properties: - `visible` - define when to display this content. Possible values are: - `default` (default) - content is visible only when not hovered. - `hover` - content is visible only when hovered. - `always` - content is always visible. - `placement` - define where to place this content. Possible values are `top-start`, `top-end`, `middle` (default), `bottom-end` and `bottom-start`. ### media - type: ReactNode - description: Accept image URL or a custom node as a media background. ### skin - type: "none" | "dark" | "gradient" - description: Sets a default overlay skin. - default: 'none' ### hoverSkin - type: "none" | "dark" | "gradient" - description: Sets a hover overlay skin. ### dataHook - type: string - description: Applies a data-hook HTML attribute that can be used in the tests. ### hovered - type: boolean - description: Toggles hover state in a controlled mode. ### onClick - type: () => void - description: Defines a click handler. When provided, component will be clickable and will have a pointer cursor on hover. ### removeRoundedBorders - type: boolean - description: Removes a default borders radius. ### className - type: string - description: Specifies a CSS class name to be appended to the component's root element. - internal ### borderRadius - type: string | number - description: Control border radius of the media container. ### ariaHidden - type: boolean - description: Adding aria-hidden="true" to an element removes that element and all of its children from the accessibility tree. ### isVideo - type: boolean - description: Indicates if the media is a video element. When true, displays play/pause controls. ### showPlayButton - type: boolean - description: Controls visibility of the play button overlay. Only applies when isVideo is true. - default: true ### videoSrc - type: string - description: Video element source URL. Only used when isVideo is true. ### videoProps - type: VideoHTMLAttributes<HTMLVideoElement> - description: Additional props to pass to the video element.