@keyline-icons/react-native 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,84 @@
1
+ <img src="https://keylineicons.com/icon.svg" width="56" height="56" alt="Keyline Icons logo">
2
+
3
+ # @keyline-icons/react-native
4
+
5
+ 1,114 icons on one 24×24 grid, as React Native components. Works in Expo,
6
+ free under MIT.
7
+
8
+ [keylineicons.com](https://keylineicons.com) to browse the full set.
9
+
10
+ ```bash
11
+ npm i @keyline-icons/react-native react-native-svg
12
+ ```
13
+
14
+ In Expo, `npx expo install react-native-svg` picks the version your SDK
15
+ expects.
16
+
17
+ ```tsx
18
+ import { ArrowUpRight, Check, Menu } from "@keyline-icons/react-native"
19
+
20
+ export function Example() {
21
+ return (
22
+ <>
23
+ <Check />
24
+ <ArrowUpRight size={16} color="#2563eb" />
25
+ <Menu strokeWidth={1.5} />
26
+ </>
27
+ )
28
+ }
29
+ ```
30
+
31
+ ## Props
32
+
33
+ Every icon takes `react-native-svg`'s `SvgProps` plus `size`:
34
+
35
+ | Prop | Default | Notes |
36
+ | --- | --- | --- |
37
+ | `size` | `24` | Sets both `width` and `height`. |
38
+ | `color` | `#000` | Paints the drawing, plates included. |
39
+ | `strokeWidth` | `2` | The set is drawn at 2 on a 24 grid. |
40
+
41
+ A native view has no CSS to inherit a colour from, so pass `color` wherever the
42
+ icon should follow your theme. The two-tone and duotone plates are drawn at 40%
43
+ of that same colour, so one prop sets both tones.
44
+
45
+ Icons are hidden from VoiceOver and TalkBack with `aria-hidden`, since an icon
46
+ beside a label would otherwise be read twice. For an icon that stands alone,
47
+ pass `aria-hidden={false}` and an `aria-label`.
48
+
49
+ ## Notes
50
+
51
+ **Four styles, two corner treatments, eight entry points.**
52
+
53
+ ```tsx
54
+ import { Bell } from "@keyline-icons/react-native" // stroke, 1,114 icons
55
+ import { Bell } from "@keyline-icons/react-native/two-tone" // two-tone, 1,114 icons
56
+ import { Bell } from "@keyline-icons/react-native/duotone" // duotone, 1,114 icons
57
+ import { Bell } from "@keyline-icons/react-native/fill" // fill, 1,114 icons
58
+
59
+ import { Bell } from "@keyline-icons/react-native/sharp" // the same four,
60
+ import { Bell } from "@keyline-icons/react-native/sharp/two-tone" // cut sharp,
61
+ import { Bell } from "@keyline-icons/react-native/sharp/duotone" // with butt caps and
62
+ import { Bell } from "@keyline-icons/react-native/sharp/fill" // square corners
63
+ ```
64
+
65
+ The entry points and export names are the same as `@keyline-icons/react`, so
66
+ code shared between a web app and a native one changes the package name and
67
+ nothing else.
68
+
69
+ **React Native 0.79 or Expo SDK 53, or newer.** The style entry points are
70
+ package `exports`, which Metro resolves by default from those versions on. On
71
+ an older Metro, set `resolver.unstable_enablePackageExports = true` in
72
+ `metro.config.js`; the root import works either way.
73
+
74
+ **Expo web works too.** `react-native-svg` renders to DOM SVG there, and the
75
+ icons carry nothing that only makes sense on a phone.
76
+
77
+ **Generated, not written.** The components come from the same SVGs as
78
+ `@keyline-icons/react`, in the same pass of `pipeline/build-react.mjs`, so a new
79
+ drawing reaches both packages or neither.
80
+
81
+ ## Licence
82
+
83
+ MIT. Use them in anything, commercial included, without attribution. The licence
84
+ does not grant rights in the name "Keyline Icons".