Appearance
zk-heading
Renders a semantic heading (
<h1>–<h6>) based on thelevelprop.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
level | int | 1 | Heading level 1–6, clamped automatically |
class | string|null | null | CSS class(es) merged onto the element |
Examples
Basic
blade
<x-zk-heading :level="2">Section Title</x-zk-heading>
{{-- renders: <h2>Section Title</h2> --}}Dynamic level
blade
<x-zk-heading :level="$depth" class="section-title">
{{ $section->title }}
</x-zk-heading>Notes
- Level is clamped between 1 and 6 — passing
0renders<h1>, passing9renders<h6>.