Now.js Framework Documentation

Now.js Framework Documentation

IconPickerComponent

TH 04 Sep 2026 01:40

IconPickerComponent

Now.js – IconPickerComponent Reusable icon-picker: renders a radio button grid for selecting an icomoon icon class. Compatible with the GCMS admin form data-attr binding system. Usage in templates (data-attr binding from form API load):

Usage with a static pre-selected value: Props: data-name — radio input name attribute (default: 'icon') data-value — initially selected icon class; omit when using data-attr form binding Programmatic API: IconPicker.create(el, { name: 'icon', value: 'icon-home' }) IconPicker.icons() → string[] of all available icon class names

หน้านี้สร้างจากซอร์สโดยตรงเมื่อ 2026-08-21 คำอธิบายมาจาก JSDoc ในไฟล์
รันซ้ำได้ด้วย docs_scaffold เมื่อโค้ดเปลี่ยน อย่าแก้ด้วยมือถ้าตั้งใจให้ generate ต่อ

ที่มา

  • ไฟล์: Now/js/IconPickerComponent.js (318 บรรทัด)
  • รูปแบบ: object literal (singleton)

เมธอดสาธารณะ (4)

create(el, {name = 'icon', value = ''} = {})

Build an icon picker inside el without the ComponentManager. Useful inside the Designer inspector or any JS-rendered panel.

getValue(el)

Get the currently selected icon class from a picker element.

icons()

All available icon class names (excludes the empty "None" option).

setValue(el, value)

Update the selected value in an already-built picker.

พึ่งพาคลาสอื่น

ComponentManager