BlazeWidgetItemStyle - React Native

The BlazeWidgetItemAppearance interface represents the appearance and styling configuration for a widget item.

Properties

title

title?: BlazeWidgetItemTitleStyle = { ... }

A BlazeWidgetItemTitle object that defines the style settings for the title of the widget item.

subtitle

subtitle?: BlazeWidgetItemSubtitleStyle

The subtitle line of the widget item, rendered directly below the title. Hidden by default, and shown only for items that carry a subtitle (Moments content). The subtitle has no position of its own: title.position and title.margins place the title, subtitle, and description block.

PropertyTypeDescription
isVisiblebooleanWhether the subtitle is shown. Defaults to false.
topSpacingnumberThe spacing above the subtitle, in points on iOS and whole dp on Android.
readStateBlazeTitleStyleThe text style when the item is read.
unreadStateBlazeTitleStyleThe text style when the item is unread.

description

description?: BlazeWidgetItemDescriptionStyle

The description line of the widget item, rendered directly below the subtitle, or below the title when the subtitle is not visible. Hidden by default, and shown only for items that carry a description (Moments content). The description has no position of its own: title.position and title.margins place the title, subtitle, and description block.

PropertyTypeDescription
isVisiblebooleanWhether the description is shown. Defaults to false.
topSpacingnumberThe spacing above the description, in points on iOS and whole dp on Android.
readStateBlazeTitleStyleThe text style when the item is read.
unreadStateBlazeTitleStyleThe text style when the item is unread.

statusIndicator

statusIndicator?: BlazeWidgetItemStatusIndicatorStyle = { ... }

A BlazeWidgetItemStatusIndicator object that defines the appearance settings for the status indicator of the widget item.

backgroundColor

backgroundColor?: string

A string representing the background color of the widget item.
The default value is .clear

cornerRadius

cornerRadius?: number

A number represents the corner radius of the widget item.

cornerRadiusRatio

cornerRadiusRatio?: number

The corner radius ratio is a value between 0.0 and 1.0, which computes the final corner radius for the widget item. Overrides corner radius property

image

image?: BlazeWidgetItemImageStyle = { ... }

A BlazeWidgetItemImageStyle object that defines the appearance settings for the image of the widget item.

margins

margins?: BlazeMargins

An BlazeMargins representing the margins of the widget item.

durationElement

durationElement?: BlazeWidgetItemDurationElementStyle

The duration badge of the widget item. Stories presets hide it by default.

Changed in React Native SDK 1.21.0: every Moments layout preset shows the duration badge by default on iOS and Android. Hide it with widgetItemStyle.durationElement.isVisible: false. Android applies durationElement from this version; before, only iOS applied it.

PropertyTypeDescription
isVisiblebooleanWhether the duration badge is shown.
positionBlazeObjectPositioningThe position of the badge.
insetsBlazeMarginsThe margins around the badge.
contentPaddingBlazeMarginsThe padding inside the badge.
iconBlazeImageAn icon shown at the start of the badge.
liveUnreadStateBlazeWidgetItemDurationElementStateStyleThe badge style for an unread live item.
liveReadStateBlazeWidgetItemDurationElementStateStyleThe badge style for a read live item.
unreadStateBlazeWidgetItemDurationElementStateStyleThe badge style for an unread item.
readStateBlazeWidgetItemDurationElementStateStyleThe badge style for a read item.

Each state is a BlazeWidgetItemDurationElementStateStyle:

PropertyTypeDescription
isVisiblebooleanWhether the badge is shown in this state.
backgroundColorstringThe background color of the badge.
backgroundImageBlazeImageThe background image of the badge.
textStyleBlazeTitleStyleThe style of the duration text.
cornerRadiusnumberThe corner radius of the badge.
cornerRadiusRationumberThe corner radius ratio of the badge.
borderColorstringThe border color of the badge.
borderWidthnumberThe border width of the badge.
glassBackgroundBlazeGlassBackgroundStateiOS only, no effect on Android. Whether this state renders a Liquid Glass background instead of its flat backgroundColor / backgroundImage, with backgroundColor tinting the glass. Defaults to 'automatic'. See BlazeGlassBackgroundState below.

playIconElement

playIconElement?: BlazeWidgetItemPlayIconElementStyle

The play icon overlay of the widget item, rendered centered on the thumbnail. Hidden by default. Its visibility depends on this style only, not on the content type. Only visibility and the Liquid Glass background are customizable.

PropertyTypeDescription
isVisiblebooleanWhether the play icon is shown. Defaults to false.
glassBackgroundBlazeGlassBackgroundStateiOS only, no effect on Android. Whether the play icon renders a Liquid Glass background. Defaults to 'automatic'. See BlazeGlassBackgroundState below.

BlazeGlassBackgroundState

glassBackground overrides the global BlazeSDK.setLiquidGlassEnabled(enabled) setting (iOS 26 and later, off by default) for one element. Read more here. It is for use on iOS only; on Android it has no effect. On iOS versions earlier than 26, no glass renders, whatever the value.

ValueDescription
'automatic'Follows BlazeSDK.setLiquidGlassEnabled for elements that already carry a translucent background by default.
'on'Renders glass regardless of the global setting.
'off'Never renders glass.

Usage

To create an instance of BlazeWidgetItemAppearance, you can either use the default values or provide your own:

const customItemStyle: BlazeWidgetItemStyle {
  title?: BlazeWidgetItemTitleStyle;
  subtitle?: BlazeWidgetItemSubtitleStyle;
  description?: BlazeWidgetItemDescriptionStyle;
  image?: BlazeWidgetItemImageStyle;
  statusIndicator?: BlazeWidgetItemStatusIndicatorStyle;
  backgroundColor?: string;
  cornerRadius?: number;
  cornerRadiusRatio?: number;
  margins?: BlazeMargins;
  badge?: BlazeWidgetItemBadgeStyle;
  durationElement?: BlazeWidgetItemDurationElementStyle;
  playIconElement?: BlazeWidgetItemPlayIconElementStyle;
}

Did this page help you?