Socket
Socket
Sign inDemoInstall

@dynatrace/barista-components

Package Overview
Dependencies
26
Maintainers
3
Versions
131
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @dynatrace/barista-components

Dynatrace components for Angular


Version published
Weekly downloads
16
decreased by-23.81%
Maintainers
3
Created
Weekly downloads
 

Changelog

Source

16.0.4 (2024-02-26)

Bug Fixes

  • drawer: Removed no longer necessary will-change property from the drawer. (3a4492f)

Readme

Source

Tag

The dt-tag wraps text or key-value pairs, which then is wrapped by dt-tag-list.

Imports

You have to import the DtTagModule to use the dt-tag-list and the dt-tag:

@NgModule({
  imports: [DtTagModule],
})
class MyModule {}

Initialization

To display tags in your view, use the <dt-tag-list> wrapper element put <dt-tag> elements inside the wrapper.

In addition <dt-tag> allows other selectors to be used.

  • <dt-tag> or [dt-tag] or [dtTag] - To create the tag itself. Attribute selectors can be used on an anchor tag for example.
  • <dt-tag-key> or [dt-tag-key] or [dtTagKey] - To identify a content child as a key/attribute for the tag.

Inputs

NameTypeDefaultDescription
valueTundefinedThis can be used to bind a specific value to a tag.
removablebooleanfalseIf this is set to true, the tag can be removed by the user by clicking the abort icon.

Outputs

NameTypeDefaultDescription
removedevent<T>This event is fired, when the user triggers the abort icon.

Tag list

The dt-tag-list element evaluates whether an amount of dt-tag elements fit in one line and displays a 'more' button when it doesn't fit. If provided dt-tag-add will always be displayed at the end of the dt-tag-list.

Inputs

NameTypeDefaultDescription
aria-labelstringundefindedUsed to set the 'aria-label' attribute on the underlying input element.

Tag add button

The dt-tag-add button allows manual tag entries to an entity. The tag add button should be placed inside the dt-tag-list wrapper and after your dt-tag elements.

Inputs

NameTypeDefaultDescription
placeholderstringundefinedPlaceholder string for the add tag input overlay.
aria-labelstringundefinedUsed to set the 'aria-label' attribute on the underlying input element.
titlestringAdd TagTitle of the overlay and 'Add Tag' button.
submitLabelstringAddTitle of the 'Add' submit button.
labelstringundefinedTitle of the 'Add Tag' button. Used to overwrite the default label.

Outputs

NameTypeDescription
submittedEventEmitter<event>Emits event when the form is submitted. With the default form the event contains a tag key that holds the value of the input.
closedEventEmitter<void>Emits event when the input overlay is closed.

Methods

NameTypeDescription
open()voidOpens the input overlay.
close()voidCloses the input overlay.
submit()voidTriggers submitted if the form is valid.

Custom tag add form

A custom form can be passed to the dt-tag-add component. You need to include a FormGroupDirective (from @angular/forms) inside the ng-content and the form's value will be used when the form is submitted in the output.

Examples

Removable state

With key/category

Interactive example

Keywords

FAQs

Last updated on 26 Feb 2024

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