Icon

Font Awesome icons rendered via the PHP helper or raw <i> tags. Manhattan ships Font Awesome 6 and provides a convenient wrapper.

Common Icons

fa-check fa-info-circle fa-exclamation-triangle far fa-circle fa-spinner fa-spin fa-home fa-user fa-cog fa-trash fa-edit

Style Prefixes

fas (solid) far (regular) fab (brands)
PHP

PHP PHP Methods

Method / PropertyParametersDescription
$m->icon($faName)string $faNameRender an icon. Accepts fa-name, fas fa-name, far fa-name, fab fa-name.
->addClass($class)string $classAdd extra CSS classes to the icon element.
->attr($name, $value)string, ?stringSet an HTML attribute on the icon.
->data($name, $value)string, ?stringSet a data-* attribute.

JS JS API

Method / PropertyParametersDescription
m.icon(faName, options)string, ?objectReturns an HTML string for a Font Awesome icon.

PHP Constructor Options (PHP)

Method / PropertyParametersDescription
stylestringIcon style prefix: fas (default), far, fab, fal, fad.
ariaHiddenboolSet to false to make icon visible to screen readers (default: true).
ariaLabelstringAdds aria-label and role="img" to the icon.