simple-icons / simple-icons
流行品牌的 SVG 图标
- dev-develop
- 13.11.0
- 13.10.0
- 13.9.0
- 13.8.0
- 13.7.0
- 13.6.0
- 13.5.0
- 13.4.0
- 13.3.0
- 13.2.0
- 13.1.0
- 13.0.0
- 12.4.0
- 12.3.0
- 12.2.0
- 12.1.0
- 12.0.0
- 11.15.0
- 11.14.0
- 11.13.0
- 11.12.0
- 11.11.0
- 11.10.0
- 11.9.0
- v11.8.0
- 11.7.0
- 11.6.0
- 11.5.0
- 11.4.0
- 11.3.0
- 11.2.0
- 11.1.0
- 11.0.0
- 10.4.0
- 10.3.0
- 10.2.0
- 10.1.0
- 10.0.0
- 9.21.0
- 9.20.0
- 9.19.1
- 9.19.0
- 9.18.0
- 9.17.0
- 9.16.1
- 9.16.0
- 9.15.0
- 9.14.0
- 9.13.0
- 9.12.0
- 9.11.0
- 9.10.0
- 9.9.0
- 9.8.0
- 9.7.0
- 9.6.0
- 9.5.0
- 9.4.0
- 9.3.0
- 9.2.0
- 9.1.0
- 9.0.0
- 8.15.0
- 8.14.0
- 8.13.0
- 8.12.1
- 8.11.0
- 8.10.0
- 8.9.0
- 8.8.0
- 8.7.0
- 8.6.0
- 8.5.0
- 8.4.0
- 8.3.0
- 8.2.0
- 8.1.0
- 8.0.0
- 7.21.0
- 7.20.0
- 7.19.0
- 7.18.0
- 7.17.0
- 7.16.0
- 7.15.0
- 7.14.0
- 7.13.0
- 7.12.0
- 7.11.0
- 7.10.0
- 7.9.0
- 7.8.0
- 7.7.0
- 7.6.0
- 7.5.0
- 7.4.0
- 7.3.0
- 7.2.0
- 7.1.0
- 7.0.0
- 6.23.0
- 6.22.0
- 6.21.0
- 6.20.0
- 6.19.0
- 6.18.0
- 6.17.0
- 6.16.0
- 6.15.0
- 6.14.0
- 6.13.0
- 6.12.0
- 6.11.0
- 6.10.0
- 6.9.0
- 6.8.0
- 6.7.0
- 6.6.0
- 6.5.0
- 6.4.0
- 6.3.0
- 6.2.0
- 6.1.0
- 6.0.0
- 5.24.0
- 5.23.0
- 5.22.0
- 5.21.1
- 5.21.0
- 5.20.0
- 5.19.0
- 5.18.0
- 5.17.0
- 5.16.0
- 5.15.0
- 5.14.0
- 5.13.0
- 5.12.0
- 5.11.0
- 5.10.0
- 5.9.0
- 5.8.1
- 5.8.0
- 5.7.0
- 5.6.0
- 5.5.0
- 5.4.0
- 5.3.0
- 5.2.0
- 5.1.0
- 5.0.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.21.0
- 4.20.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.16.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.0
- 4.8.0
- 4.7.0
- 4.6.0
- 4.5.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.1
- 4.0.0
- 3.13.0
- 3.12.4
- 3.12.3
- 3.12.2
- 3.12.1
- 3.12.0
- 3.11.0
- 3.10.0
- 3.9.0
- 3.8.0
- 3.7.0
- 3.6.1
- 3.6.0
- 3.5.0
- 3.4.1
- 3.4.0
- 3.3.0
- 3.2.0
- 3.1.0
- 3.0.1
- 3.0.0
- 2.19.0
- 2.18.0
- v2.17.1
- 2.17.0
- 2.16.0
- 2.15.0
- 2.14.0
- 2.13.0
- 2.12.0
- 2.11.0
- 2.10.0
- v2.9.0
- v2.8.0
- v2.7.0
- v2.6.0
- v2.5.0
- v2.4.0
- v2.3.0
- v2.2.0
- v2.1.0
- 2.0.0
- v1.20.0
- 1.19.1
- 1.19.0
- v1.18.0
- v1.17.1
- v1.17.0
- dev-master
This package is auto-updated.
Last update: 2024-09-22 07:29:24 UTC
README
Simple Icons
超过 3200 个流行品牌的免费 SVG 图标。在 SimpleIcons.org 上查看所有图标。可以在 GitHub 上提交贡献、更正和请求。
使用方法
重要
我们要求所有用户在使用 Simple Icons 的图标之前阅读我们的 法律免责声明。
通用使用
图标可以直接从 我们的网站 下载为 SVG - 只需点击所需图标的下载按钮,下载就会自动开始。
CDN 使用
图标可以从 CDN,如 jsDelivr 或 unpkg 提供服务。只需使用 simple-icons npm 包,并在 URL 中指定版本,如下所示
<img height="32" width="32" src="https://cdn.jsdelivr.net.cn/npm/simple-icons@v13/icons/[ICON SLUG].svg" /> <img height="32" width="32" src="https://unpkg.com/simple-icons@v13/icons/[ICON SLUG].svg" />
其中 [ICON SLUG] 用您要使用的图标的 别名 替换,例如
<img height="32" width="32" src="https://cdn.jsdelivr.net.cn/npm/simple-icons@v13/icons/simpleicons.svg" /> <img height="32" width="32" src="https://unpkg.com/simple-icons@v13/icons/simpleicons.svg" />
这些示例使用最新主要版本。这意味着在下一个主要版本发布后,您不会收到任何更新。您可以使用 @latest 来无限期接收更新。然而,如果图标被删除,这会导致 404 错误。
带颜色的 CDN
我们还提供了一种 CDN 服务,允许您使用颜色。
<img height="32" width="32" src="https://cdn.simpleicons.org/[ICON SLUG]" /> <img height="32" width="32" src="https://cdn.simpleicons.org/[ICON SLUG]/[COLOR]" /> <img height="32" width="32" src="https://cdn.simpleicons.org/[ICON SLUG]/[COLOR]/[DARK_MODE_COLOR]" />
其中 [COLOR] 是可选的,可以用您要使用的图标的 十六进制颜色 或 CSS 关键字 替换。默认颜色为在 simpleicons.org 网站上 显示的图标的十六进制颜色。[DARK_MODE_COLOR] 用于暗模式。如果指定了值,将使用 CSS prefers-color-scheme。例如
<img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/gray" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/hotpink" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/0cf" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/0cf9" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/00ccff" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/00ccff99" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/orange/pink" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/_/eee" /> <img height="32" width="32" src="https://cdn.simpleicons.org/simpleicons/eee/_" />
您可以使用 viewbox=auto 参数来获取自动大小的视图框。如果您希望所有图标渲染为一致大小,这很有用
<img height="20" src="https://cdn.simpleicons.org/github?viewbox=auto" /> <img height="20" src="https://cdn.simpleicons.org/simpleicons?viewbox=auto" /> <img height="20" src="https://cdn.simpleicons.org/awesomelists?viewbox=auto" />
Node 使用 
图标也可以通过我们的 npm 包获得。要安装,只需运行
npm install simple-icons
所有图标都是从单个文件导入的,其中 [ICON SLUG] 由大写的 slug 替换。我们强烈建议使用能够摇树的打包器,例如 webpack,以删除未使用的图标代码
// Import a specific icon by its slug as: // import { si[ICON SLUG] } from 'simple-icons' // For example: // use import/esm to allow tree shaking import { siSimpleicons } from 'simple-icons'; // or with require/cjs const { siSimpleicons } = require('simple-icons');
它将返回一个图标对象
console.log(siSimpleicons); /* { title: 'Simple Icons', slug: 'simpleicons', hex: '111111', source: 'https://simpleicons.org/', svg: '<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg>', path: 'M12 12v-1.5c-2.484 ...', guidelines: 'https://simpleicons.org/styleguide', license: { type: '...', url: 'https://example.com/' } } NOTE: the `guidelines` entry will be `undefined` if we do not yet have guidelines for the icon. NOTE: the `license` entry will be `undefined` if we do not yet have license data for the icon. */
如果您需要遍历所有图标,请使用
import * as icons from 'simple-icons';
TypeScript 使用方法 
类型定义与包捆绑在一起。
import type { SimpleIcon } from 'simple-icons';
PHP 使用方法 
图标也通过我们的 Packagist 包提供。安装时,只需运行
composer require simple-icons/simple-icons
然后可以按以下方式使用此包,其中 [ICON SLUG] 由一个 slug 替换
<?php // Import a specific icon by its slug as: echo file_get_contents('path/to/package/icons/[ICON SLUG].svg'); // For example: echo file_get_contents('path/to/package/icons/simpleicons.svg'); // <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">...</svg> ?>
第三方扩展
以下是已知的第三方工具扩展。
维护扩展? 提交 PR 以将其包含在上面的列表中。
第三方库
以下是已知用于您自己的项目的第三方库。我们只保留至少与我们上一个主要版本更新的项目。
维护库? 提交 PR 以将其包含在上面的列表中。
贡献
有关如何贡献的信息可以在文件 CONTRIBUTING.md 中找到