Dual-tone heading.
One semantic heading with a separately colored accent line, editable in the visual page builder.
Preview
Let’s talk.Make something good.
<?= component('dual-tone-heading', ['text' => 'Let’s talk.', 'accent' => 'Make something good.', 'level' => '2']) ?>Usage
Use when one phrase needs visual emphasis without splitting the document heading structure.
- Gunakan layout DL yang sudah memuat CSS dan dl.js.
- Letakkan kode berikut di view PHP Anda.
- Ganti data contoh dengan nilai aplikasi. Teks di-escape otomatis.
<?= component('dual-tone-heading', ['text' => 'Let’s talk.', 'accent' => 'Make something good.', 'level' => '2']) ?>API reference
Props PHP yang didukung implementasi DL. Field di dalam array mengikuti bentuk pada kolom Type. Props yang tidak dicantumkan tidak menjadi bagian API komponen.
| Prop | Type / values | Panduan |
|---|---|---|
text | string | Primary escaped heading line. |
accent | string | Escaped line receiving the theme accent color. |
level | 1|2|3|4 | Semantic heading level. |
Behavior & accessibility
Both escaped text fragments remain inside a single h1-h4 selected by level. Color is decorative and must not be the only source of meaning.
Uji keyboard, fokus, dan pembaca layar pada halaman aplikasi Anda. Contoh ini tidak menggantikan audit aksesibilitas aplikasi secara menyeluruh.
Source & agent context
Source tersedia di views/components/dual-tone-heading.php. Edit template ini jika membutuhkan perilaku tambahan. API PHP DL berbeda dari API React sumber rujukan.
php dl component dual-tone-heading