guide
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. |
<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>