Skip to content

Latest commit

 

History

History
40 lines (25 loc) · 918 Bytes

README.md

File metadata and controls

40 lines (25 loc) · 918 Bytes

react-native-dynamic-avatar

Port for gridy-avatars

Install from npm

yarn add react-native-dynamic-avatar

Dependencies

Demo

ViewPager

Basic usage

import generate from 'react-native-dynamic-avatar'

export default function App () {

  const avatar = generate([0, 0, 0, 0, 0, 0], 128)
  // body type 0-7 --------^  |  |  |  |  |     ^------- SVG size
  // body color 0-7 ----------^  |  |  |  ^------- mouth color 0-7 
  // eye type 0-7 ---------------^  |  ^ --------- mouth type 0-7 
  // eye color 0-7 -----------------^

  return (
    <View>
      {avatar}
    </View>
  )
}

See example.tsx for source of demo gif