# Styling with cls and stl

> How the cls and stl attributes target internal parts of every component.

Every component exposes named parts. `cls` adds classes to a part and `stl` adds inline styles; both take `key: value` pairs separated by `;`. A plain value without a key applies to the component's default part.

| Syntax | Meaning |
| --- | --- |
| `cls="part: a b"` | Add classes `a b` to `part`. |
| `stl="part: color: red"` | Set inline styles on `part`. |
| `cls="a b"` | Apply to the default part when no key is given. |

```html
<z-calendar
  cls="host-inner: z-cal shadow-lg; day-button: rounded-full"
  stl="header: margin-block-end: 1rem"
  value="2026-11-29"
></z-calendar>
```

> **Note:** Default parts differ per component: `host-inner` for the calendar, `dialog` for the command palette, and `open` for the accordion's `cls`. Each component page lists its part keys and whether they support `cls`, `stl`, or both.
