# Post Rendering

## Custom Post Rendering

UIKit provides default renderers for the core data types, `text`, `image`, and `file`.  For custom post rendering, a map of data type and renderer can be registered and UIKit will refer to this map while rendering post component.&#x20;

### Usage

```
// To provide a custom renderer, implement an AmityPostRenderer
val customViewHolder = object : AmityPostRenderer {

    // Specify the dataType to be rendered by this renderer
    override fun getDataType(): String = "myapp.customtype"

    // Provide a layout of your viewHolder
    override fun getLayoutId(): Int = R.layout.custom_post

    // Provide a viewHolder that is subclassed from AmityPostContentViewHolder
    override fun createViewHolder(
        view: View
    ): AmityPostContentViewHolder {
        return MyCustomViewHolder(view)
    }

    // Choose whether to have a post header
    override fun enableHeader(): Boolean {
        return true 
    }

    // Choose whether to have a post footer 
    override fun enableFooter(): Boolean {
        return false
    }
}
    
 // Register the custom renderer    
AmityUIKitClient.socialUISettings.registerPostRenderers(listOf(customViewHolder))   
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.social.plus/social-plus-uikit/uikit-3/android/community/overriding-uikit-behaviour/overriding-global-behaviour/feed-ui-settings/post-rendering.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
