Pular para o conteúdo principal

Tag

Import

import { Tag } from '@resultadosdigitais/tangram-components'

Properties

children 📍

Concerns
📍 Required
Typeelement | string | array | node

Description

Sets the children.

as

Typenode | string

Description

Set element type to be rendered for this component. By default it will be render a div element.

clickable 🗑️

Concerns
🗑️ Deprecated: - Use `onClick` to automatically display the appropriate styles of hover, focus and active states.
Typebool
Defaulttrue

Description

Allows interaction in the component using defined styles as hover, focus, active. When is false the Tag will not be clickable, even if onClick prop is defined.

kind

Type
Enum of:
  • Tag.kinds.default
  • Tag.kinds.primary
  • Tag.kinds.success
  • Tag.kinds.warning
  • Tag.kinds.danger
  • Tag.kinds.help
DefaultTag.kinds.default

Description

Sets the kind.

icon

Typenode

Description

Sets the icon which will be positioned at the beginning.

onClick

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when the Tag is clicked.

onDelete

Typefunc
Paramevent React.SyntheticEvent - The event source of the callback.

Description

Callback fired when the close button is clicked. If defined will display a delete button and keep the kind style as default Tag.kinds.default automatically.

size

Type
Enum of:
  • Tag.sizes.md
  • Tag.sizes.lg
  • Tag.sizes.xl
DefaultTag.sizes.MD

Description

Sets the size.

removable 🗑️

Concerns
🗑️ Deprecated: - Use `onDelete` property as callback to define automatically the display with delete icon button.
Typebool

Description

Sets a type removable tag.

startIcon 🗑️

Concerns
🗑️ Deprecated: - Use `icon` property instead of it.
Typenode

Description

Sets the icon on start.

Feedback