1.0.1 • Published 4 years ago

react-native-dynamic-avatar v1.0.1

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-native-dynamic-avatar

Port for gridy-avatars

Install from npm

yarn add react-native-dynamic-avatar

Dependencies

Demo

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