Skip to main content

Media Hero Vimeo

A MediaHeroVimeo displays a Vimeo video with an optional placeholder image.

Example

Variants

Use theicon above to preview
VariantDescriptionValues
MediaHero.paddingTop
  • regular
  • extra
MediaHero.paddingBottom
  • regular
  • extra
MediaHero.height
  • default
  • hero
  • banner

Customization

Approach for customization will vary depending on if the customization is intended to be global for all consumers of the ui component or if it is only an override for a particular instance.

  • If the customization is necessary for all users, update the source code of in the ui component library directly.
  • Otherwise, you can pass className overrides.

Say you wanted a Vimeo Media Hero with a height of 240 pixels:

<MediaHeroVimeo {...variants} className='h-60'>
<MediaHeroVimeoBackground>
<VimeoPlayer {...vimeo}>
{placeholderImage && (
<VimeoPlayerOverlay>
<VimeoPlayerText>Play</VimeoPlayerText>
<VimeoPlayerImage asChild>
<img {...placeholderImage} src={placeholderImage.src} />
</VimeoPlayerImage>
</VimeoPlayerOverlay>
)}
<VimeoPlayerIframe />
</VimeoPlayer>
</MediaHeroVimeoBackground>
</MediaHeroVimeo>