Native
Script: https://koin-ad.click/native/v1/main.js
Element: <x-native>
Global object: native
Shared methods are in the Ad tag API. Native adds the type attribute. type chooses the layout. It does not follow the container size.
Install
Give the element a box. The ad fills that box.
html
<div style="width: 360px; height: 120px">
<script
async
src="https://koin-ad.click/native/v1/main.js?id=UNIT_ID"
></script>
<x-native type="detail"></x-native>
</div>type
If type is missing or not in this list, the layout is compact.
type | Layout | Creative it asks for |
|---|---|---|
compact | Short row, icon beside the title | 64×64 |
detail | Larger icon and a description | 120×120 |
card | Image across the top | 430×242 |
html
<x-native type="card"></x-native>theme() names
| Name | Selects |
|---|---|
native | The <x-native> element |
card | The whole card |
cover | The image |
body | The text block |
headline | The title row |
brand | The brand line |
title | The title |
subtitle | The description |
action | The action |
tools | The tool row |
tool | One tool |
js
native.theme(`
card {
background: #111;
}
title {
color: white;
}
`);