---
id: avatar_accessory
title: Avatar.Accessory
---

import { IconsStyle } from "@site/src/components/Docs_Icons";
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";
import CodeBlock from "@theme/CodeBlock";
import { BiInfoCircle } from "react-icons/bi";

<IconsStyle />

This is used for adding an accessory to the Avatar.
Receives either all [Icon](icon#props) or [Image](image#props) props.

## Usage

<div class="row inline-flex-center">
  <div class="col col--3">
    <h4>Import</h4>
  </div>
  <div class="col col--9">
    <CodeBlock>{`import { Avatar } from '@rneui/themed';`}</CodeBlock>
  </div>
  <div class="col col--3">
    <h4>
      Theme Key{" "}
      <a href="../customizing#using-themeprovider">
        <BiInfoCircle />
      </a>
    </h4>
  </div>
  <div class="col col--9">
    <CodeBlock>{`AvatarAccessory`}</CodeBlock>
  </div>
</div>

## Props

:::note
Includes all [Icon](icon#props), [Image](image#props), [Text](https://reactnative.dev/docs/text#props) props.
:::

<div class='table-responsive'>

| Name             | Type                                 | Default | Description                                       |
| ---------------- | ------------------------------------ | ------- | ------------------------------------------------- |
| `onLongPress`    | GestureResponderEventHandler         |         | Called when a long-tap gesture is detected.       |
| `onPress`        | GestureResponderEventHandler         |         | Called when a single tap gesture is detected.     |
| `onPressIn`      | GestureResponderEventHandler         |         | Called when a touch is engaged before `onPress`.  |
| `onPressOut`     | GestureResponderEventHandler         |         | Called when a touch is released before `onPress`. |
| `pressableProps` | PressableProps except click handlers | `None`  |                                                   |

</div>
