# Events, slots and theming

> Events a component dispatches, slots it projects, and the parts and CSS variables a site can style.

> Esta página ainda não tem tradução para o português; este é o texto em inglês. (This page is not translated yet: the English text follows.)

> Generated from the contract schemas of `@taggor/contract` 1.10.0 by `pnpm docs:contract`; do not edit.

Events, slots, parts and CSS variables are the component's public surface towards the host page. Each is declared under its own name in the manifest.

## EventDeclaration

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | `string`, 1 to 300 characters, a fixed pattern (see the JSON Schema) | no | What this member is for; shown in docs, the portal and to agents. |
| `detail` | [ValueSchema](../props/#valueschema) | yes | Schema of `event.detail`; use { "type": "object", "fields": {} } for an event without data. |
| `bubbles` | `boolean` | no | Defaults to true. |
| `composed` | `boolean` | no | Defaults to true. |

## SlotDeclaration

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | `string`, 1 to 300 characters, a fixed pattern (see the JSON Schema) | no | What this member is for; shown in docs, the portal and to agents. |

## PartDeclaration

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `description` | `string`, 1 to 300 characters, a fixed pattern (see the JSON Schema) | no | What this member is for; shown in docs, the portal and to agents. |

## CssVarDeclaration

Exactly one of:

- an object, fields below
- type `"font-family"`, fields below

### CssVarDeclaration, object

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | one of `"color"`, `"length"`, `"number"`, `"percentage"` | yes | The kind of CSS value the variable holds (`color`, `length`, `number`, `percentage` or `font-family`); the build checks `default` against it. |
| `default` | `string`, 1 to 100 characters, a fixed pattern (see the JSON Schema) | yes | The value the component uses when the site does not set the variable. |
| `description` | `string`, 1 to 300 characters, a fixed pattern (see the JSON Schema) | no | What this member is for; shown in docs, the portal and to agents. |

### CssVarDeclaration, type "font-family"

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `type` | the constant `"font-family"` | yes | The kind of CSS value the variable holds (`color`, `length`, `number`, `percentage` or `font-family`); the build checks `default` against it. |
| `default` | `string`, 1 to 100 characters, pattern `^[a-zA-Z0-9,\s-]+$` | yes | The value the component uses when the site does not set the variable. |
| `description` | `string`, 1 to 300 characters, a fixed pattern (see the JSON Schema) | no | What this member is for; shown in docs, the portal and to agents. |
