Skip to contentSkip to navigationSkip to topbar
Paste assistant Assistant
Figma
Star

Media Object

Version 10.1.0GithubStorybook

Media Object is a layout utility that allows an image or figure to be positioned horizontally next to some form of content.

Installation

Installation page anchor
yarn add @twilio-paste/media-object
import {MediaObject, MediaFigure, MediaBody} from '@twilio-paste/core/media-object';

const Component = (props) => (
  <MediaObject verticalAlign="center">
    <MediaFigure spacing="space40">...</MediaFigure>
    <MediaBody>...</MediaBody>
  </MediaObject>
);

MediaObject

MediaObject page anchor

as

Type
any

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MEDIA_OBJECT'

marginBottom

Type
any

marginTop

Type
any

verticalAlign

Aligns the figure and body

Type
"center" | "top"

align

Type
"start" | "end"

as

Type
any

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MEDIA_FIGURE'

spacing

Space between the figure and body

Type
any

as

Type
any

element

Overrides the default element name to apply unique styles with the Customization Provider

Type
any
Default
'MEDIA_BODY'