Skip to content
COMPONENT / LAYOUT

Direction.

Set direction rtl atau ltr untuk konten teks dalam container..

PHP + native HTML/CSSNo build

Preview

مرحباً بك في DL Framework

Usage

Set direction rtl atau ltr untuk konten teks dalam container.

  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('direction', ['text' => 'مرحباً بك في DL Framework', 'direction' => 'rtl']) ?>

Examples

Right to left

مرحبا بالعالم

PHP view
<?= component('direction', ['text' => 'مرحبا بالعالم', 'direction' => 'rtl']) ?>

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.

Direction props
PropType / valuesPanduan
textstringIsi teks biasa; HTML di-escape.
directionstringltr atau rtl (default ltr).

Behavior & accessibility

Atribut dir menetapkan arah penulisan; pastikan bahasa dan teks aplikasi sesuai.

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

Terminal
php dl component direction

Component guide · JavaScript & events · Styling

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