# Icon

- category: UI
- chinese: 图标
- type: UI Component

---


## Design
  
Icon can be a square picture or iconfont. Nuke adds built-in icons. please visit demo to see all icons.

## API

| Props   | Description                                                                      | Type     | Default  |
| ------- | -------------------------------------------------------------------------------- | -------- | -------- |
| type    | add type field，flag choice:  `image` `iconfont`                                 | string   | 'image'  |
| size    | effective in `type = image`, size：'xs', 'small', 'medium', 'large'              | string   | 'medium' |
| onPress | ( invalid when passed in name ) Press event                                      | Function | null     |
| src     | picture url or iconfont url                                                      | string   | null     |
| name    | iconfont name value                                                              | string   | null     |
| version | If you use the new version of the QianNiu official icons, you need to pass in v2 | string   | default  |

