# Tag
### Install
```js
import { createApp } from 'vue';
import { Tag } from 'vant';
const app = createApp();
app.use(Tag);
```
## Usage
### Basic Usage
```html
Tag
Tag
Tag
Tag
```
### Plain style
```html
Tag
```
### Round style
```html
Tag
```
### Mark style
```html
Tag
```
### Closeable
```html
Tag
```
```js
import { ref } from 'vue';
export default {
setup() {
const show = ref(true);
const close = () => {
show.value = false;
};
return {
show,
close,
};
},
};
```
### Custom Size
```html
Tag
Tag
Tag
```
### Custom Color
```html
Tag
Tag
Tag
```
## API
### Props
| Attribute | Description | Type | Default |
| --- | --- | --- | --- |
| type | Type, can be set to `primary` `success` `danger` `warning` | _string_ | `default` |
| size | Size, can be set to `large` `medium` | _string_ | - |
| color | Custom color | _string_ | - |
| show | Whether to show tag | _boolean_ | `true` |
| plain | Whether to be plain style | _boolean_ | `false` |
| round | Whether to be round style | _boolean_ | `false` |
| mark | Whether to be mark style | _boolean_ | `false` |
| text-color | Text color | _string_ | `white` |
| closeable | Whether to be closeable | _boolean_ | `false` |
### Slots
| Name | Description |
| ------- | ------------ |
| default | Default slot |
### Events
| Event | Description | Arguments |
| ----- | ---------------------------------- | -------------- |
| click | Emitted when component is clicked | _event: Event_ |
| close | Emitted when close icon is clicked | - |
### Less Variables
How to use: [Custom Theme](#/en-US/theme).
| Name | Default Value | Description |
| --------------------------- | --------------------------- | ----------- |
| @tag-padding | `0 @padding-base` | - |
| @tag-text-color | `@white` | - |
| @tag-font-size | `@font-size-sm` | - |
| @tag-border-radius | `2px` | - |
| @tag-line-height | `16px` | - |
| @tag-medium-padding | `2px 6px` | - |
| @tag-large-padding | `@padding-base @padding-xs` | - |
| @tag-large-border-radius | `@border-radius-md` | - |
| @tag-large-font-size | `@font-size-md` | - |
| @tag-round-border-radius | `@border-radius-max` | - |
| @tag-danger-color | `@red` | - |
| @tag-primary-color | `@blue` | - |
| @tag-success-color | `@green` | - |
| @tag-warning-color | `@orange` | - |
| @tag-default-color | `@gray-6` | - |
| @tag-plain-background-color | `@white` | - |