# Avatar

### Example

```jsx
import React from 'react';
import Avatar from 'q3-ui/lib/avatar';
import { navigate } from '@reach/router'; 
import AccountBoxIcon from '@material-ui/icons/AccountBox';

export const ExampleAvatar = () => {
    const handleClick = React.useCallback(() => {
        navigate('/account')
    }, []);
    
    return (
        <Avatar 
            icon={AccountBox}
            tooltip="Visit account"
            onClick={handleClick}        
        />
    );
}
```

### Usage

| Prop          | Description                                                      | Type          |
| ------------- | ---------------------------------------------------------------- | ------------- |
| `word`        | Fuels the "alt" attribute as well as the first letter to display | string        |
| `imgSrc`      | Path to a hosted image. Will fallback to the MUI BrokenLink icon | string        |
| `superscript` | Content to display within an Avatar badge                        | string,number |
| `large`       | Expands the scale of the Avatar                                  | Boolean       |
| `tooltip`     | Wraps the Avatar in an accessible Tooltip component              | string        |
| `onClick`     | Handles click and focus actions on the Avatar                    | function      |


---

# 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://3merge.gitbook.io/q3/client/ui/avatar.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.
