Skip to content

Display.image

Displays an image within your Buttonize app.

Display.image(url, props)

Usage

lib/MyStack.ts
4 collapsed lines
import { ButtonizeApp, Display } from 'buttonize/cdk'
new ButtonizeApp(this, 'DemoApp')
.page('DemoPage', {
body: [
Display.image('https://avatars.githubusercontent.com/u/72308571?s=50', {
alt: 'Buttonize Log'
})
]
})

Preview

app.buttonize.io

Props

url

Required

string
The URL of the image to show.

alt

Optional

string

A description for the image for accessibility.

spacingTop

Optional

’sm’ | ‘md’ | ‘lg’ | ‘xl’

The amount of space to give above the component.

spacingBottom

Optional

’sm’ | ‘md’ | ‘lg’ | ‘xl’

The amount of space to give below the component.

width

Optional

1 | 2 | 3 | 4
The width of the component.