Skip to content

Commit 34cc928

Browse files
docs: add LICENSE, rewrite README, introduce CHANGELOG for v2.0
- Adds an explicit MIT LICENSE file at the repository root, with a trailing note that the icon designs themselves are MIT by Cole Bemis. The package.json already declared MIT, but the missing file was the cause of the licensing question raised in the tracker. Closes #18. - Rewrites README.md around the v2 API: size, color, absoluteStrokeWidth, ref forwarding, deep imports, and a v1 -> v2 migration block. Adds an upfront note that Feather upstream is in maintenance mode (no new icons since 2020) and points readers at Lucide for projects that need a growing set. - Introduces CHANGELOG.md in keep-a-changelog format with the full v2.0 entry and a pointer to git history for older releases.
1 parent f9ab6c2 commit 34cc928

3 files changed

Lines changed: 194 additions & 77 deletions

File tree

CHANGELOG.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file. The format
4+
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this
5+
project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## [2.0.0] — 2026-05-03
8+
9+
The first major-version bump in nearly five years. Tooling, types, and the
10+
public component API have all been modernized; the icons themselves are still
11+
the original Feather set (now at upstream `4.29.2`).
12+
13+
### Added
14+
15+
- `size` prop as a shorthand for `width` + `height` (default `24`). _(closes #16)_
16+
- `color` prop as the documented alias for `stroke` (default `"currentColor"`).
17+
- `absoluteStrokeWidth` prop — keeps perceived stroke weight constant across
18+
sizes by computing `strokeWidth * 24 / size`. Useful for 14–16 px icons.
19+
- Forwarded refs on every icon, so you can target the underlying `Svg` from
20+
hooks like `useAnimatedRef` or third-party imperative APIs. _(closes #17)_
21+
- `displayName` on every icon, removes the
22+
"Component definition is missing display name" lint warning. _(closes #15)_
23+
- `createIcon(name, iconNode)` factory exported for users who want to ship
24+
custom icons with the same API.
25+
- Per-icon deep imports via the `exports` map, e.g.
26+
`import { ArrowUpCircle } from 'react-native-feather/icons/ArrowUpCircle'`.
27+
- TypeScript declarations for both ESM and CJS (`.d.ts` and `.d.cts`).
28+
- A real `LICENSE` file at the repository root. _(closes #18)_
29+
- CI workflow runs lint, typecheck, tests and build against Node 20 and 22.
30+
- npm provenance attestation on every published release.
31+
32+
### Changed
33+
34+
- **Build pipeline:** `tsc` + `api-extractor` replaced with `tsup` (esbuild
35+
under the hood). Output now lives in `dist/`, not `lib/`.
36+
- **Module format:** dual ESM + CJS through the `exports` field, with proper
37+
`types` resolution for both. Drops the legacy single-`main` shape.
38+
- **Icon source:** SVGR is gone. Icons are now generated from `feather-icons`
39+
by `scripts/build-icons.mjs` and committed to `src/icons/`, so the source
40+
tree is browseable on GitHub and the build is fully reproducible.
41+
- **Peer dependencies widened.** Was `react-native >=0.46`,
42+
`react-native-svg >=5.3`. Now `react >=16.8`, `react-native-svg >=12`,
43+
`react-native: "*"`.
44+
- Bumped `feather-icons` from `4.28.0` to `4.29.2` (no new icons upstream,
45+
only build tooling fixes).
46+
- Sorted icon exports alphabetically in the barrel index.
47+
- Each path/polygon/etc. inside an icon now has a stable `key`, silencing the
48+
React list-key warning when icons mount.
49+
50+
### Removed
51+
52+
- `api-extractor` and its config — `tsup` emits declarations directly.
53+
- `.svgrrc.js` and the SVGR dev dependency.
54+
- The old publish workflow that auto-committed version bumps back to `master`
55+
and ran `contributors-readme-action`. Replaced with a tag-driven publish
56+
pipeline that creates a GitHub release with auto-generated notes.
57+
58+
### Migration
59+
60+
```diff
61+
- <ArrowUpCircle stroke="red" width={32} height={32} />
62+
+ <ArrowUpCircle color="red" size={32} />
63+
```
64+
65+
The old props still resolve, so existing call sites keep working until you
66+
choose to update them.
67+
68+
## [1.1.2] — 2021-06-27
69+
70+
See git history for releases prior to v2.
71+
72+
[2.0.0]: https://github.com/yigithanyucedag/react-native-feather/compare/v1.1.2...v2.0.0
73+
[1.1.2]: https://github.com/yigithanyucedag/react-native-feather/releases/tag/v1.1.2

LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
MIT License
2+
3+
Copyright (c) 2020-present Yiğithan Yücedağ
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.
22+
23+
---
24+
25+
Feather Icons, the underlying icon set, are released under the MIT License
26+
by Cole Bemis. See https://github.com/feathericons/feather for details.

README.md

Lines changed: 95 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,99 +1,117 @@
1-
## React Native Feather Icons
1+
# react-native-feather
22

3-
[![npm version](https://img.shields.io/npm/v/react-native-feather.svg?style=flat-square)](https://www.npmjs.com/package/react-native-feather)
4-
[![npm downloads](https://img.shields.io/npm/dm/react-native-feather.svg?style=flat-square)](https://www.npmjs.com/package/react-native-feather)
3+
[![npm](https://img.shields.io/npm/v/react-native-feather.svg?style=flat-square)](https://www.npmjs.com/package/react-native-feather)
4+
[![downloads](https://img.shields.io/npm/dm/react-native-feather.svg?style=flat-square)](https://www.npmjs.com/package/react-native-feather)
5+
[![bundlephobia](https://img.shields.io/bundlephobia/minzip/react-native-feather?style=flat-square)](https://bundlephobia.com/package/react-native-feather)
6+
[![license](https://img.shields.io/npm/l/react-native-feather.svg?style=flat-square)](./LICENSE)
57

6-
#### What is react-native-feather?
8+
[Feather Icons](https://feathericons.com) for React Native — a thin, typed, tree-shakable wrapper around `react-native-svg`. 287 icons, ref-forwarding, `size`/`color`/`absoluteStrokeWidth` props.
79

8-
react-native-feather is a collection of simply beautiful open source icons for React Native. Each icon is designed on a 24x24 grid with an emphasis on simplicity, consistency and readability.
10+
> **Note on the icon set.** Feather is designed by [Cole Bemis](https://github.com/feathericons/feather) (MIT). The set is largely stable — the upstream is in maintenance mode and no new icons have shipped since 2020. If you need a constantly growing set, consider [Lucide](https://lucide.dev) (the active fork). This package keeps the original Feather set faithful for projects that want exactly that.
911
10-
At its core, Feather is a collection of SVG files. To use SVG files on React Native, [`react-native-svg`](https://github.com/react-native-community/react-native-svg) is needed. This component contains all Feather icons converted to make compatible with [`react-native-svg`](https://github.com/react-native-community/react-native-svg) package.
12+
## Install
1113

12-
#### Based on Feather Icons `v4.28.0`
14+
```bash
15+
npm install react-native-feather react-native-svg
16+
# or
17+
yarn add react-native-feather react-native-svg
18+
```
19+
20+
`react-native-svg` is a peer dependency. Any version `>=12` works.
1321

14-
## Installation
22+
## Usage
1523

16-
1. Ensure sure you've installed [`react-native-svg`](https://github.com/react-native-community/react-native-svg)
17-
2. `npm i react-native-feather`
24+
```tsx
25+
import { ArrowUpCircle } from 'react-native-feather';
1826

19-
### Icons
27+
export const Demo = () => <ArrowUpCircle />;
28+
```
2029

21-
List of available icons in this component.
22-
[https://feathericons.com](https://feathericons.com/)
30+
Override defaults with props:
2331

24-
### Usage
32+
```tsx
33+
<ArrowUpCircle size={32} color="#0ea5e9" strokeWidth={1.5} />
34+
```
2535

26-
To use icons as component, all icon names is formatted to Pascal Case.
27-
arrow-up-circle => `<ArrowUpCircle/>`
36+
You can also import the whole pack:
2837

29-
```javascript
30-
import { ArrowUpCircle } from "react-native-feather";
38+
```tsx
39+
import * as Icon from 'react-native-feather';
3140

32-
const App = () => {
33-
return <ArrowUpCircle />;
34-
};
41+
<Icon.ArrowUpCircle />
3542
```
3643

37-
Icons can be configured with inline props:
44+
Or deep-import a single icon (helps with bundlers that don't tree-shake well):
3845

39-
```javascript
40-
<ArrowUpCircle stroke="red" fill="#fff" width={32} height={32} />
46+
```tsx
47+
import { ArrowUpCircle } from 'react-native-feather/icons/ArrowUpCircle';
4148
```
4249

43-
You can also include the whole icon pack:
50+
### Forwarded refs
51+
52+
Every icon forwards its ref to the underlying `Svg`, so you can drive imperative APIs (e.g. `react-native-reanimated`) directly:
53+
54+
```tsx
55+
import { useRef } from 'react';
56+
import { Activity } from 'react-native-feather';
57+
58+
const ref = useRef(null);
59+
<Activity ref={ref} />
60+
```
61+
62+
## Props
63+
64+
All `react-native-svg` `<Svg>` props are accepted. Specific to icons:
65+
66+
| Prop | Type | Default | Description |
67+
| --------------------- | ---------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
68+
| `size` | number \| string | `24` | Sets both `width` and `height`. |
69+
| `color` | string | `"currentColor"` | Stroke color of the line. |
70+
| `strokeWidth` | number \| string | `2` | Width of the stroke. |
71+
| `absoluteStrokeWidth` | boolean | `false` | Scales stroke down as the icon grows so perceived weight stays constant: `strokeWidth * 24 / size`. Useful at small sizes (16, 14). |
72+
| `width` | number \| string || Overrides `size` for width only. |
73+
| `height` | number \| string || Overrides `size` for height only. |
74+
| `fill` | string | `"none"` | Fill color (Feather icons are line-based, leave as `none` unless you know what you're doing). |
75+
76+
## Migrating from v1
77+
78+
v2 is mostly drop-in. The breaking changes:
4479

45-
```javascript
46-
import * as Icon from "react-native-feather";
80+
- `width` / `height` defaults moved into a `size` prop. The old props still work; if you set both, the explicit one wins.
81+
- Use `color` instead of `stroke` (`stroke` still works but `color` is the documented prop).
82+
- Now ships ESM + CJS via the `exports` field. If your tooling pinned to `lib/index.js`, switch to the package name (e.g. `import { Activity } from 'react-native-feather'`).
83+
- Peer deps widened: `react-native-svg >=12`, `react >=16.8`.
4784

48-
const App = () => {
49-
return <Icon.ArrowUpCircle />;
50-
};
85+
```diff
86+
- <ArrowUpCircle stroke="red" width={32} height={32} />
87+
+ <ArrowUpCircle color="red" size={32} />
5188
```
5289

53-
### Properties
54-
55-
Any [Svg property](https://github.com/react-native-community/react-native-svg#common-props) and the following:
56-
57-
| Prop | Description | Default |
58-
| ----------------- | -------------------------------------------------------------------- | ---------------- |
59-
| **`width`** | Width of the icon. | `24` |
60-
| **`height`** | Height of the icon. | `24` |
61-
| **`stroke`** | The stroke prop refers to the color outline the icon. | `"currentColor"` |
62-
| **`strokeWidth`** | The strokeWidth prop specifies the width of the outline on the icon. | `2` |
63-
| **`fill`** | The fill prop refers to the color inside the icon. | `"none"` |
64-
65-
### Author
66-
<!-- readme: yigithanyucedag -start -->
67-
<table>
68-
<tr>
69-
<td align="center">
70-
<a href="https://github.com/yigithanyucedag">
71-
<img src="https://avatars.githubusercontent.com/u/25598773?v=4" width="100;" alt="yigithanyucedag"/>
72-
<br />
73-
<sub><b>Yiğithan</b></sub>
74-
</a>
75-
</td></tr>
76-
</table>
77-
<!-- readme: yigithanyucedag -end -->
78-
79-
## Contributors
80-
81-
<!-- readme: contributors -start -->
82-
<table>
83-
<tr>
84-
<td align="center">
85-
<a href="https://github.com/yigithanyucedag">
86-
<img src="https://avatars.githubusercontent.com/u/25598773?v=4" width="100;" alt="yigithanyucedag"/>
87-
<br />
88-
<sub><b>Yiğithan</b></sub>
89-
</a>
90-
</td>
91-
<td align="center">
92-
<a href="https://github.com/FDiskas">
93-
<img src="https://avatars.githubusercontent.com/u/468006?v=4" width="100;" alt="FDiskas"/>
94-
<br />
95-
<sub><b>Vytenis</b></sub>
96-
</a>
97-
</td></tr>
98-
</table>
99-
<!-- readme: contributors -end -->
90+
## Available icons
91+
92+
All 287 icons from Feather Icons. Names follow PascalCase, matching the Feather identifier:
93+
94+
`arrow-up-circle``ArrowUpCircle`, `alert-triangle``AlertTriangle`, etc.
95+
96+
Browse the full set at [feathericons.com](https://feathericons.com).
97+
98+
## Custom icons
99+
100+
The factory used internally is exported, so you can ship custom icons that share the same API:
101+
102+
```tsx
103+
import { createIcon } from 'react-native-feather';
104+
105+
export const Sparkle = createIcon('Sparkle', [
106+
['path', { d: 'M12 2 14 10 22 12 14 14 12 22 10 14 2 12 10 10z', key: 'svg-0' }],
107+
]);
108+
```
109+
110+
## Credits
111+
112+
- **Icons:** [Feather Icons](https://github.com/feathericons/feather) by [Cole Bemis](https://github.com/colebemis), MIT.
113+
- **React Native wrapper:** maintained by [@yigithanyucedag](https://github.com/yigithanyucedag), MIT.
114+
115+
## License
116+
117+
[MIT](./LICENSE)

0 commit comments

Comments
 (0)