# Chip

### Uso

{% code title="page-chip.component.html" %}

```html
<cat-toolbar [config]="getToolbarInfo()">
  <nav buttons>
    <cat-chip class="mr-5" color="success">Success</cat-chip>
    <cat-chip class="mr-5" color="warning">Warning</cat-chip>
    <cat-chip class="mr-5" color="danger">Danger</cat-chip>
    <cat-chip class="mr-5" color="info">Info</cat-chip>
    <cat-chip class="mr-5" color="primary">Primary</cat-chip>
    <cat-chip class="mr-5" color="secondary">Secondary</cat-chip>
    <cat-dynamic-component [component]="chipWithDynamicComponent"></cat-dynamic-component>
  </nav>
</cat-toolbar>
```

{% endcode %}

{% hint style="info" %}
O componente de **chip** também possui integração com os [componentes dinâmicos](/exibicao-de-dados/componentes-dinamicos.md), permitindo a inclusão deste componente pelo [Datatable](/exibicao-de-dados/datatable.md).
{% endhint %}

{% code title="page-chip.component.ts" lineNumbers="true" %}

```typescript
import { Component } from '@angular/core';
import { CatComponentBase } from '@catrx/ui/common';
import { CatChip } from '@catrx/ui/chip';

@Component({
  templateUrl: './page-chip.component.html',
})
export class PageChipComponent extends CatComponentBase {
  chipWithDynamicComponent = new CatChip('Componente Dinâmico', 'success');
}
```

{% endcode %}

{% code title="page-chip.module.ts" lineNumbers="true" %}

```typescript
import { CatDynamicComponentModule } from '@catrx/ui/dynamic-component';
import { NgModule } from '@angular/core';
import { CatChipModule } from '@catrx/ui/chip';
import { CatToolbarModule } from '@catrx/ui/toolbar';
import { PageChipComponent } from './page-chip.component';
import { PageChipRoutingModule } from './page-chip.routing.module';

@NgModule({
  declarations: [PageChipComponent],
  imports: [
    CatToolbarModule,
    CatChipModule,
    CatDynamicComponentModule,
    PageChipRoutingModule,
  ],
})
export class PageChipModule {}
```

{% endcode %}

### Overview

{% embed url="<https://cat-ui.igordrangel.com.br/components/chip>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.catui.igordrangel.com.br/exibicao-de-dados/chip.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
