If you need to showcase or manipulate specific parts of the avatar independently, use the Piece component. The pieceType prop determines which part to render (e.g., 'mouth', 'eyes', 'eyebrows', 'accessories', 'top', 'facialHair', 'clothe', 'graphics', or 'skin'). Use the corresponding type prop (like mouthType, eyeType, etc.) to select the specific style.
import * as React from 'react'
import {Piece} from 'avataaars';
export default class MyComponent extends React.Component {
render () {
return
<div>
<Piece pieceType="mouth" pieceSize="100" mouthType="Eating"/>
<Piece pieceType="eyes" pieceSize="100" eyeType="Dizzy"/>
<Piece pieceType="eyebrows" pieceSize="100" eyebrowType="RaisedExcited"/>
<Piece pieceType="accessories" pieceSize="100" accessoriesType="Round"/>
<Piece pieceType="top" pieceSize="100" topType="LongHairFro" hairColor="Red"/>
<Piece pieceType="facialHair" pieceSize="100" facialHairType="BeardMajestic"/>
<Piece pieceType="clothe" pieceSize="100" clotheType="Hoodie" clotheColor="Red"/>
<Piece pieceType="graphics" pieceSize="100" graphicType="Skull" />
<Piece pieceType="skin" pieceSize="100" skinColor="Brown" />
</div>
</div>
}
}