Banner
The Banner component is a versatile UI element used for displaying multiple important announcements, promotions in a horizontally scrollable format. It typically appears at the top or bottom of an app
Component Visuals

Demo
In this video, you'll learn:
How to use the component.
Customization options for the Banner component.
Installation
To install the Quest react-native-native-sdk
into your project, follow these steps:
Open your terminal/command prompt.
Navigate to your project's root directory using the
cd
command if you're not already there.Run the following command to install the
quest-sdk
package using npm:
npm install @questlabs/react-native-sdk
This command will download and install the package and its dependencies into your project.
Props of Login Component
The Banner
component accepts the following props
mainViewStyle
ViewStyle
optional
The BackGround View of the Banner.
imageStyle
ImageStyle
optional
The Image Style of the Banner.
dotViewStyle
ViewStyle
optional
The Dot View Style.
dotStyle
ViewStyle
optional
The Dot Style.
data
Data Item
required
// Types
type DataItem = {
id: number;
image: string | any;
};
Usage
To integrate the Banner component into your React application, follow these steps
Import the Banner Component: Import the Tutorial component from the
@questlabs/react--native-sdk
package.
import { Banner } from "@questlabs/react-native-sdk";
Example Usage
Here's an example of how to use the Banner component within your React Native application.
import { SafeAreaView, StyleSheet } from "react-native";
import React from "react";
import { Banner } from "@questlabs/react-native-sdk";
export default function App() {
return (
<SafeAreaView style={styles.container}>
<Banner
imageStyle={{ width: 400, height: 200 }}
data={[
{
id: "1",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
{
id: "2",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
{
id: "3",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
{
id: "4",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
{
id: "5",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
{
id: "6",
image:
"https://cdn.pixabay.com/photo/2018/03/21/07/16/learning-3245793_1280.jpg",
},
]}
/>
</SafeAreaView>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: "lightgray",
justifyContent: "center",
},
});
Last updated