Room collection.
Editable room cards with image, display rate, size, guests, bed and detail link.
Preview
<?= component('room-collection', ['items' => [['title' => 'City Suite', 'size' => '45 m²', 'guests' => '2 guests', 'bed' => 'King bed', 'text' => 'A welcoming space above the city.', 'href' => '/site']]]) ?>Usage
Load page-layout.css. In the visual editor find Hospitality & highlights. All text is escaped; no executable theme snippets are stored.
- 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('room-collection', ['items' => [['title' => 'City Suite', 'size' => '45 m²', 'guests' => '2 guests', 'bed' => 'King bed', 'text' => 'A welcoming space above the city.', 'href' => '/site']]]) ?>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 |
|---|---|---|
items | array of 1–12 data objects | Use the example structure. Values are validated and text escaped. |
Behavior & accessibility
Server-rendered text and native semantic controls. Links and buttons retain keyboard focus. Text ribbon pauses on focus and respects reduced motion. Stay planner forwards dates only; the destination form remains responsible for validation.
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/room-collection.php. Edit template ini jika membutuhkan perilaku tambahan. API PHP DL berbeda dari API React sumber rujukan.
php dl component room-collection