Premium Offers
topPremiumOffers
topPremiumOffersThe topPremiumOffers component is a part of the Tyrads SDK that provides a UI widget to display premium offers. It allows for extensive customization to control what type of offers are shown and how they are presented.
Usage
import Tyrads from '@tyrads.com/tyrads-sdk';
function OffersScreen() {
return (
<SafeAreaView style={{ flex: 1 }}>
{Tyrads.topPremiumOffers({
showMore: true,
showMyOffers: true,
showMyOffersEmptyView: false,
viewStyle: 1,
})}
</SafeAreaView>
);
}Props
showMore
showMoreType:
booleanDefault:
trueDescription: Determines whether the "Show More" option should be displayed to load additional offers.
showMyOffers
showMyOffersType:
booleanDefault:
trueDescription: Controls the visibility of the "My Offers" section.
showMyOffersEmptyView
showMyOffersEmptyViewType:
booleanDefault:
falseDescription: If
true, an empty view will be displayed if there are no "My Offers" available.
viewStyle
viewStyleType:
numberDefault:
1Description: Controls the UI style of the offers display. Possible values may vary depending on available layout options in the SDK.
Available
viewStyleoptionsStyle 1: Default style.

Option 1 Style 2: Currently used.

Option 2 Style 3: Alternate layout.

Option 3 Style 4: Advanced layout.

Option 4
Example with Customization
import Tyrads from '@tyrads.com/tyrads-sdk';
function CustomOffersScreen() {
return (
<SafeAreaView style={{ flex: 1 }}>
{Tyrads.topPremiumOffers({
showMore: false,
showMyOffers: true,
showMyOffersEmptyView: true,
viewStyle: 2,
})}
</SafeAreaView>
);
}Notes
Ensure that
Tyrads.init()andTyrads.loginUser()are called before renderingtopPremiumOffersto ensure the necessary data is available.The
viewStyleproperty directly affects the visual presentation; experiment with different values to find the most suitable layout for your app.
Last updated