# Badges

To use Badges, first import `SharedModule` in your module.

```typescript
import {SharedModule} from '@gaxon/modules';

@NgModule({
  ...
  imports: [SharedModule, ...],
  ...
})
export class YourAppModule {
}
```

### Default Badges

{% tabs %}
{% tab title="Preview" %}
![](/files/-LuL81AOU9B1RziNe6DP)
{% endtab %}

{% tab title="HTML" %}

#### By Component

```markup
<gx-badge class="mb-2 mr-2" type="primary">Primary</gx-badge>
<gx-badge class="mb-2 mr-2" type="secondary">Secondary</gx-badge>
<gx-badge class="mb-2 mr-2" type="success">Success</gx-badge>
```

#### By Directive

```markup
<span class="mb-2 mr-2" gxBadge="primary">Primary</span>
<span class="mb-2 mr-2" gxBadge="secondary">Secondary</span>
<span class="mb-2 mr-2" gxBadge="success">Success</span>
```

{% endtab %}
{% endtabs %}

### Link Badges

{% tabs %}
{% tab title="Preview" %}
![](/files/-LuL81AOU9B1RziNe6DP)
{% endtab %}

{% tab title="HTML" %}

```markup
<a href="javascript:void(0)" class="mb-2 mr-2" gxBadge="primary">Primary</a>
<a href="javascript:void(0)" class="mb-2 mr-2" gxBadge="secondary">Secondary</a>
<a href="javascript:void(0)" class="mb-2 mr-2" gxBadge="success">Success</a>
```

{% endtab %}
{% endtabs %}

### Pill Badges

{% tabs %}
{% tab title="Preview" %}
![](/files/-LuL9-RF5kBzaf7VMEho)
{% endtab %}

{% tab title="HTML" %}

```markup
<gx-badge class="mb-2 mr-2" type="primary" pill>Primary</gx-badge>
<gx-badge class="mb-2 mr-2" type="secondary" pill>Secondary</gx-badge>
<gx-badge class="mb-2 mr-2" type="success" pill>Success</gx-badge>
```

{% endtab %}
{% endtabs %}


---

# 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://docs-drift-angular.g-axon.work/components/badges.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.
