Socket
Socket
Sign inDemoInstall

azir-block

Package Overview
Dependencies
1
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    azir-block

An advance Block component that should render nicely on any platform. Supports a great level of customization.


Version published
Weekly downloads
3
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Azir Framwork : https://azir.io/docs

Avatar

Avatars are found all over ui design from lists to profile screens. They are commonly used to represent a user and can contain photos, icons, or even text.

Installation

to install the latest version of azir-avatar you only need to run:

npm install azir-avatar  --save

or

yarn add azir-avatar

Examples

Basic :
import Avatar from "azir-avatar";
import { BrandIcons } from "azir-icon";
---
//Image
<Avatar
  source={ { uri: "https://images.unsplash.com/photo-1527980965255-d3b416303d12?ixid=eyJhcHBfaWQiOjEyMDd9" } } />
//ICON
<Avatar icon={BrandIcons.react} />
//Title
<Avatar title="RN" />
Basic
Advance with Styles :
import Avatar from "azir-avatar";
import  Icon,{ BrandIcons } from "azir-icon";
---
<Avatar style={ {borderWidth:1,borderColor:"red"} }
  icon={BrandIcons.react} shadow size={300}
  color="gray" contentColor="error" rounded={false}
  contentStyle={ {borderWidth:1, borderRadius:50, padding:5,borderColor:"white" } }
/>
Basic
Custom content with Press :
import Avatar from "azir-avatar";
import Button from "azir-button";
import  Icon,{ SolidIcons } from "azir-icon";
---
<Button
  color="transparent"
  onPress={() => {
    console.log("hii");
  }}>
    <Avatar
      size={"large"}
      style={ { backgroundColor: "#eee",borderWidth:1,borderColor:"#ff9900" } }>
      <Icon icon={SolidIcons.baby} color="#ff9900"></Icon>
    </Avatar>
</Button>
Basic

Props

you can add any extra props based on the avatar content type ( for example if you have image avatar then you can pass image props to the avatar component )

<Avatar resizeMode="cover" />

Reference

source

Avatar Image Source ( in case you want an image avatar )

TypeRequiredDefault
image source objectNonull

title

Avatar title text ( in case you want text avatar )

TypeRequiredDefault
stringNonull

icon

Avatar Icon ( in case you want Azir Icon avatar )

TypeRequiredDefault
SolidIcons, RegularIcons, BrandIcons , CustomIconsNonull

color

Background Color of the avatar

TypeRequiredDefault
azir-colorNotheme

size

set the avatar component Size.

TypeRequiredDefault
("small" , "medium" , "large" , "xlarge" , number)Nomedium

contentColor

set the avatar Color (for icon & Text)

TypeRequiredDefault
azir-colorNowhite

rounded

Makes the avatar circular or square

TypeRequiredDefault
booleanNotrue

shadow

If true, show shadow effect for this component.

TypeRequiredDefault
boolNofalse

contentStyle

override Avatar content Style based on the avatar content ( image, icon, text)

TypeRequired
styleNo

style

override Avatar Container Style which include ( View Style )

TypeRequired
styleNo

Keywords

FAQs

Last updated on 19 Dec 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc