1.1.1 • Published 6 years ago

@mandala-ui/tag v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

Mandala UI Tag Component

Mandala is a React component library that utilizes a declarative CSS library for styling.

Installation

Check the MonoRepo README for installation.

Description

Tag is just a simple element to show metadata in a small font

Usage

if using the whole library:

import { Tag } from 'mandala';

if only using this component:

import Tag from '@mandala-ui/split-button';

Props

  • backgroundColor - the color of the surface area of the switches
  • disabled - sets the button as disabled and reduces opacity 40%
  • isOn - prop to switch which side of the switch is on
  • offColor - the color of the off section when the switch is off
  • onClick - function for onClick
  • onColor - the color of the on section when the switch is on
  • pill - sets the radius of the ends to 100%
  • radius - the border radius of the button (1-4, clamped), is disabled if pill is set to true
  • showLabels - shows the "on" and "off" text labels
propNamepropTypedefaultValueisRequired
backgroundColorstring'white'-
disabledstring'black'-
isOnbooleanfalse-
offColorstring'black'-
onClickfunctionnull-
onColorstring'black'-
pillbooleanfalse-
radiusbooleanfalse-
showLabelsbooleanfalse-

TODO:

  • callback for analytics, etc
  • colored border
  • border width

mandala-bottom