Add A Label To The Corner Of Components – react-native-label

Author:cawfree
Views Total:21 views
Official Page:Go to website
Publish Date:August 7, 2020
License:MIT

A React Native component that adds a customizable label to the corner of any component in the app.

Install & Import:

# Yarn
$ yarn add react-native-label

# NPM
$ npm i react-native-label --save
import React from "react";
import {View} from "react-native";
import Label, {Orientation} from "react-native-label";

Basic usage:

export default () => (
  <Label
    orientation={Orientation.TOP_RIGHT}
    containerStyle={{
      width: 300,
      height: 300,
    }}
    title="ReactScript"
    color="orange"
    distance={250}
  >
    <View
      style={{
        flex: 1,
        backgroundColor: "#222",
      }}
    />
  </Label>
);

Preview:

Add A Label To The Corner Of Components - react-native-label

You Might Be Interested In:

Leave a Reply