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?: BlazeWidgetItemSubtitleStyleThe 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.
| Property | Type | Description |
|---|---|---|
isVisible | boolean | Whether the subtitle is shown. Defaults to false. |
topSpacing | number | The spacing above the subtitle, in points on iOS and whole dp on Android. |
readState | BlazeTitleStyle | The text style when the item is read. |
unreadState | BlazeTitleStyle | The text style when the item is unread. |
description
description?: BlazeWidgetItemDescriptionStyleThe 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.
| Property | Type | Description |
|---|---|---|
isVisible | boolean | Whether the description is shown. Defaults to false. |
topSpacing | number | The spacing above the description, in points on iOS and whole dp on Android. |
readState | BlazeTitleStyle | The text style when the item is read. |
unreadState | BlazeTitleStyle | The 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?: stringA string representing the background color of the widget item.
The default value is .clear
cornerRadius
cornerRadius?: numberA number represents the corner radius of the widget item.
cornerRadiusRatio
cornerRadiusRatio?: numberThe 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?: BlazeMarginsAn BlazeMargins representing the margins of the widget item.
durationElement
durationElement?: BlazeWidgetItemDurationElementStyleThe 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.
| Property | Type | Description |
|---|---|---|
isVisible | boolean | Whether the duration badge is shown. |
position | BlazeObjectPositioning | The position of the badge. |
insets | BlazeMargins | The margins around the badge. |
contentPadding | BlazeMargins | The padding inside the badge. |
icon | BlazeImage | An icon shown at the start of the badge. |
liveUnreadState | BlazeWidgetItemDurationElementStateStyle | The badge style for an unread live item. |
liveReadState | BlazeWidgetItemDurationElementStateStyle | The badge style for a read live item. |
unreadState | BlazeWidgetItemDurationElementStateStyle | The badge style for an unread item. |
readState | BlazeWidgetItemDurationElementStateStyle | The badge style for a read item. |
Each state is a BlazeWidgetItemDurationElementStateStyle:
| Property | Type | Description |
|---|---|---|
isVisible | boolean | Whether the badge is shown in this state. |
backgroundColor | string | The background color of the badge. |
backgroundImage | BlazeImage | The background image of the badge. |
textStyle | BlazeTitleStyle | The style of the duration text. |
cornerRadius | number | The corner radius of the badge. |
cornerRadiusRatio | number | The corner radius ratio of the badge. |
borderColor | string | The border color of the badge. |
borderWidth | number | The border width of the badge. |
glassBackground | BlazeGlassBackgroundState | iOS 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?: BlazeWidgetItemPlayIconElementStyleThe 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.
| Property | Type | Description |
|---|---|---|
isVisible | boolean | Whether the play icon is shown. Defaults to false. |
glassBackground | BlazeGlassBackgroundState | iOS 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.
| Value | Description |
|---|---|
'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;
}Updated about 1 month ago
