SvgInline

SvgInline

Inline SVG file manipulation

Bootstrap Icons

Provides simple functions to add Bootstrap Icons inline. Depends on SvgInline.

echo $svg->bootstrap('alarm')->title('Wake Up');
Create an issue

Configure Bootstrap Icons behavior in config/params.php under the 'yiirocks/svg-inline-bootstrap' key:

bootstrapIconsFolder string
'@vendor/twbs/bootstrap-icons/icons'
Path to the Bootstrap Icons directory.
fallbackIcon string
'@vendor/twbs/bootstrap-icons/icons/question.svg'
Default icon to use when the requested icon is unavailable.
fill string
'currentColor'
Default SVG fill color.
fixedWidth bool
false
Default fixed-width icon rendering.
prefix string
'bi'
CSS class prefix for inline SVGs.
bootstrap string
Required
Valid name of a Bootstrap Icon.

Additional options can be chained onto the bootstrap() call:

class string
null
Additional custom classes.
css array
null
Additional CSS attributes.
fill string
'currentColor'
Color of the icon.
fixedWidth bool
false
Set to true to have a fixed width icon.
height int
null
The height of the icon. If height is given without width, the latter will be calculated from the SVG size.
id string
null
Id for the SVG tag.
title string
null
Sets a title to the SVG output. Defaults to the icon name, capitalized.
width int
null
The width of the icon. If width is given without height, the latter will be calculated from the SVG size.