Skip to content
COMPONENT / NAVIGATION

Menubar.

menus berisi label dan items tautan.

PHP + native HTML/CSSNo build

Preview

Usage

menus berisi label dan items tautan. Tiap grup memakai dropdown-menu.

  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('menubar', ['label' => 'Try this component', 'menus' => [['label' => 'Explore', 'items' => [['label' => 'Overview', 'href' => '/'], ['label' => 'Components', 'href' => '/components'], ['label' => 'Icons', 'href' => '/icons']]], ['label' => 'Resources', 'items' => [['label' => 'Playground', 'href' => '/playground']]]]]) ?>

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.

Menubar props
PropType / valuesPanduan
labelstringTeks label, pemicu, atau nama aksesibel komponen.
menusarray<{label:string,items:array<{label:string,href:string}>}>Daftar objek; isi field setiap objek mengikuti struktur tipe.

Behavior & accessibility

Navigasi native, bukan implementasi lengkap pola ARIA desktop menubar. Label menjelaskan konteks menu.

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

Terminal
php dl component menubar

Component guide · JavaScript & events · Styling

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