shaggyrec/php-svg-icons
Composer 安装命令:
composer require shaggyrec/php-svg-icons
包简介
Svg icons api for php
README 文档
README
The library for providing svg icons to the php
Install
composer require shaggyrec/php-svg-icons
Usage
Get one icon:
echo Shaggyrec\SvgIcons\icon('twitter');
Get all icons:
echo Shaggyrec\SvgIcons\icons();
Find icons by name:
echo Shaggyrec\SvgIcons\icons('twi');
Customize icons
echo Shaggyrec\SvgIcons\icon('twitter', '#fff', 24, 24);
echo Shaggyrec\SvgIcons\icons('twi', '#fff', 24, 24);
Documentation
icon
- params
- [0] name (string, mandatory) - icon name
- [1] color (string, optional) - set color
- [2] width (int, optional) - set width
- [3] height (int, optional) - set height
- returns the svg icon as string
icons
- params
- [0] searchString (string, optional) - search string for icon name
- [1] color (string, optional) - set color
- [2] width (int, optional) - set width
- [3] height (int, optional) - set height
- returns the array of
['name' => 'icon-name', 'value' => '<svg.....']
You can see all available icons in the ./icons direcory
统计信息
- 总下载量: 1.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2019-12-21