Skip to content

vko-online/react-native-dynamic-avatar

Repository files navigation

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

About

Dynamic avatars for react-native

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published