Socket
Socket
Sign inDemoInstall

@commercetools-uikit/tag

Package Overview
Dependencies
7
Maintainers
4
Versions
876
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @commercetools-uikit/tag

#### Description


Version published
Weekly downloads
4.2K
decreased by-8.21%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

Tags

Description

A tag is often used for items that need to be labeled or categorized. This might apply to search terms or categories of a product. Tags can also have a "remove" button.

Usage
import Tag from '@commercetools-uikit/tag';

<Tag
  type="normal"
  isDisabled={false}
  to="/project-key/products/foo"
  onRemove={() => {}}
>
  Icecream
</Tag>;
Properties
PropsTypeRequiredValuesDefaultDescription
typestring-normal, warningnormalIndicates color scheme of the tag
styles.bodyobject---Styles spread onto the tag body
linkTostring---Location the tag links to when enabled
isDisabledbool--falseDisables the tag and the option to remove
onRemovefunc---Called when remove is clicked
onClickfunc---Called when tag is clicked (but not when remove button is clicked)
horizontalConstraintobject-xs, s, m, l, xl, scalescaleHorizontal size limit of the input field.
childrennode--Content rendered within the tag
Where to use

Main Functions and use cases are:

  • Adding something to a set example: Adding products to categories

  • Remove from a set example: Removing products from categories

  • Showing a set example: List of categories a product is in

FAQs

Last updated on 11 Mar 2020

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