> ## Documentation Index
> Fetch the complete documentation index at: https://guide.daro.so/llms.txt
> Use this file to discover all available pages before exploring further.

# 배너 & MREC 광고

> DARO를 통해 배너와 MREC 광고를 구현하는 방법을 알아봅니다.

## 배너 & MREC 형태 소개

### 배너 광고

* 앱 레이아웃의 일부를 차지하는 직사각형 광고 형태로 보편적으로 사용됩니다.
* 대부분의 광고 디맨드들이 지원하는 형태인 320x50 사이즈를 사용합니다.

![Banner Example Pn](https://mintcdn.com/delightroom-5a71a6a8/j3-znW7LKrbpP3mb/sdk-integration/common-img/ad-formats/banner-example.png?fit=max\&auto=format\&n=j3-znW7LKrbpP3mb\&q=85\&s=d00b59bcc639852f56ead46315f574a5)

### MREC 광고

* 300x250 의 사이즈를 MREC으로 구분하여 부릅니다.
* 전반적으로 배너와 동일한 특성을 가집니다.

![Mrec Example Pn](https://mintcdn.com/delightroom-5a71a6a8/dxU0bpsPoPvkYh_g/sdk-integration/common-img/ad-formats/mrec-example.png?fit=max\&auto=format\&n=dxU0bpsPoPvkYh_g\&q=85\&s=6e43a92f3517134aba67f81f874cd36e)

***

## 배너/MREC 컴포넌트 생성하기

```javascript theme={null}
import { Platform } from "react-native";
import { AdFormat, AdBannerView } from "react-native-daro";
```

```javascript 배너 theme={null}

const BANNER_AD_UNIT_KEY = Platform.select({
    ios: "YOUR_IOS_BANNER_AD_UNIT_KEY",
    android: "YOUR_ANDROID_BANNER_AD_UNIT_KEY",
    default: '',
});

<AdBannerView
  style={styles.bannerView} //컴포넌트 생성 시 Ad Unit Key 를 전달해야합니다. style 사이즈는 320x50 으로 설정해 주세요.
  adFormat={AdFormat.BANNER}
  adUnitKey={BANNER_AD_UNIT_KEY}
/>
```

```javascript MREC theme={null}

const MREC_AD_UNIT_KEY = Platform.select({
    ios: "YOUR_IOS_MREC_AD_UNIT_KEY",
    android: "YOUR_ANDROID_MREC_AD_UNIT_KEY",
    default: '',
});

<AdBannerView
  style={styles.bannerView} //컴포넌트 생성 시 Ad Unit Key 를 전달해야합니다. style 사이즈는 300x250 으로 설정해 주세요.
  adFormat={AdFormat.MREC}
  adUnitKey={MREC_AD_UNIT_KEY}
/>
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.