# Tags

Source: https://ecosphere.dev/docs/data/tags (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

Tag cloud, e.g. “what you have in common”.

`import { EcoTags, EcoTag } from "vue-ecosphere"`

## From an array

Pass the labels as items; each renders as a tag.

Vue (vue-ecosphere):

```vue
<EcoTags :items="['State University', 'Support Guild', 'Consulting Guild']" />
```

React (react-ecosphere):

```tsx
<EcoTags items={["State University", "Support Guild", "Consulting Guild"]} />
```

## With EcoTag children

Or write the tags yourself when they need their own markup.

Vue (vue-ecosphere):

```vue
<EcoTags>
  <EcoTag>State University</EcoTag>
  <EcoTag>Support Guild</EcoTag>
  <EcoTag>Consulting Guild</EcoTag>
</EcoTags>
```

React (react-ecosphere):

```tsx
<EcoTags>
  <EcoTag>State University</EcoTag>
  <EcoTag>Support Guild</EcoTag>
  <EcoTag>Consulting Guild</EcoTag>
</EcoTags>
```

## API

Vue (vue-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `items (EcoTags)` | `string[]` | — | Tag labels. The default slot (EcoTag children) overrides them. |
| `label (EcoTag)` | `string` | — | Text when you don't use the default slot. |

React (react-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `items (EcoTags)` | `string[]` | — | Tag labels. EcoTag children override them. |
| `label (EcoTag)` | `string` | — | Text when you don't pass children. |
