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 Methods
| Method / Property | Parameters | Description |
|---|---|---|
$m->icon($faName) | string $faName | Render an icon. Accepts fa-name, fas fa-name, far fa-name, fab fa-name. |
->addClass($class) | string $class | Add extra CSS classes to the icon element. |
->attr($name, $value) | string, ?string | Set an HTML attribute on the icon. |
->data($name, $value) | string, ?string | Set a data-* attribute. |
JS JS API
| Method / Property | Parameters | Description |
|---|---|---|
m.icon(faName, options) | string, ?object | Returns an HTML string for a Font Awesome icon. |
PHP Constructor Options (PHP)
| Method / Property | Parameters | Description |
|---|---|---|
style | string | Icon style prefix: fas (default), far, fab, fal, fad. |
ariaHidden | bool | Set to false to make icon visible to screen readers (default: true). |
ariaLabel | string | Adds aria-label and role="img" to the icon. |