Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 602 Bytes

attr.md

File metadata and controls

28 lines (21 loc) · 602 Bytes

HAPEL Method Parameters


$attr

(null|array), (optional), default: null

Sets additional attributes for the tag.

Value Use
null prevents the attribute from being added to the tag
array adds each item in the array as an attribute & value

Examples:

Using an array:
$attr = [
 'tabindex'     =>  '0',
 'role'         =>  'button',
 'aria-pressed' =>  'false'
 ];
<tag tabindex="0" role="button" aria-pressed="false" {...}