Skip to content
COMPONENT / OVERLAYS

Tooltip.

Penjelasan singkat untuk tombol pemicu.

PHP + native HTML/CSSNo build

Preview

A helpful description, available on focus.

Usage

Penjelasan singkat untuk tombol pemicu. text adalah deskripsi, label adalah teks tombol.

  1. Gunakan layout DL yang sudah memuat CSS dan dl.js.
  2. Letakkan kode berikut di view PHP Anda.
  3. Ganti data contoh dengan nilai aplikasi. Teks di-escape otomatis.
PHP view
<?= component('tooltip', ['text' => 'A helpful description, available on focus.', 'label' => 'About this control']) ?>

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.

Tooltip props
PropType / valuesPanduan
textstringIsi teks biasa; HTML di-escape.
labelstringTeks label, pemicu, atau nama aksesibel komponen.
idstringID unik DOM. Jika tidak diberikan, template memakai ID otomatis atau nama field.

Behavior & accessibility

Muncul lewat hover maupun fokus; Escape menutupnya. Jangan menaruh aksi interaktif di tooltip.

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/tooltip.php. Edit template ini jika membutuhkan perilaku tambahan. API PHP DL berbeda dari API React sumber rujukan.

Terminal
php dl component tooltip

Component guide · JavaScript & events · Styling

Icons: Solar by 480 Design (CC BY 4.0) & Iconsax (MIT). PHP UI adapted from Coordiation. Logo: DesignLof.