# @nami-ui/icon

> a icon component.

Latest version **0.0.4** (published 2021-03-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install @nami-ui/icon
pnpm add @nami-ui/icon
yarn add @nami-ui/icon
bun add @nami-ui/icon
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2021-03-31 |
| First published | 2021-02-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 4 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Bios Sun |
| Maintainers | biossun, biossun-by-nami-ui |
| Keywords | Icon |

## Links

- npm: https://www.npmjs.com/package/@nami-ui/icon
- Repository: https://github.com/BiosSun/nami-ui
- Homepage: https://nami-ui.biossun.org/docs/icon
- Issues: https://github.com/BiosSun/nami-ui/issues
- npm.io page: https://npm.io/package/@nami-ui/icon

## Dependencies (4)

- [clsx](https://npm.io/package/clsx.md) ^1.1.1
- [nojiko](https://npm.io/package/nojiko.md) ^2.0.0
- [@nami-ui/utils](https://npm.io/package/@nami-ui/utils.md) ^0.0.6
- [@nami-ui/styles](https://npm.io/package/@nami-ui/styles.md) ^0.0.6

## Alternatives

- [@fortawesome/react-fontawesome](https://npm.io/package/@fortawesome/react-fontawesome.md) — 2.2M weekly downloads
- [roboto-fontface](https://npm.io/package/roboto-fontface.md) — 196.0K weekly downloads
- [@react-native-vector-icons/common](https://npm.io/package/@react-native-vector-icons/common.md) — 150.4K weekly downloads
- [@procore/core-icons](https://npm.io/package/@procore/core-icons.md) — 4.6K weekly downloads
- [@react-md/material-icons](https://npm.io/package/@react-md/material-icons.md) — 1.6K weekly downloads

## Recent versions

- 0.0.4 (latest) — 2021-03-31
- 0.0.3 — 2021-03-05
- 0.0.2 — 2021-02-21
- 0.0.1 — 2021-02-20

## README

---
id: icon
title: Icon
subtitle: 图标
---

Icon 组件提供一组 SVG 格式的图标。

```jsx reactView
import { Check } from '@nami-ui/icon'

export default () => <Check />
```

所有图标如下所示：

```jsx reactView
import {
  Up,
  Down,
  Left,
  Right,
  Check,
  Add,
  Remove,
  CircleFilled,
  GitHub,
} from '@nami-ui/icon'

export default () => {
  return (
    <IconBoxList
      icons={{
        Up,
        Down,
        Left,
        Right,
        Check,
        Add,
        Remove,
        CircleFilled,
        GitHub,
      }}
    />
  )
}
```

## "SVG Icon" vs "Icon Font"

Icon 组件之所以选择提供 SVG 格式的图标，而非 "Icon Font"，
是因为我们认为「图标应当是一种图形，而非文字」。_（有关详细的区别，请参阅[这篇文章](https://css-tricks.com/icon-fonts-vs-svg/)）_

当然，"Icon Font" 也是有很多优点的，比如 "Icon Font" 的图标颜色默认即为文本颜色；为了在 SVG 图标中实现这一优点，我们为图标设置了 `fill: currentColor;` 样式，以使图标颜色与其父元素的文本颜色的保持一致。

---
_Source: https://npm.io/package/@nami-ui/icon · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
