Tag

This component displays as a tag with an optional button to remove the given tag.

MonalisaUI

View full example: Tag Example

import React from 'react';
import { View } from 'react-native';
import { Tag } from 'monalisa-ui';

const Example = () => (
  <View>
    <Tag text="Base tag" />
  </View>
);

export default Example;

Configuration

Property

Default

Option

Description

text

-

string

Text to be displayed in the tag

color

#000

string

The text color

bgColor

#dfe1e6

string

Background color for the tag

iconLeft

-

element

Displays Icon to the left of text

iconRight

-

element

Displays Icon to the right of text

size

6

number

Size for the tag

style

-

-

Style for the tag

Example

  • tag color and background color

  • tag icon

  • tag button

Last updated