youricons-svg 0.1.0 → 0.1.1
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 +117 -7
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,13 +1,123 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://youricons-3af51.web.app">
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://youricons-3af51.web.app/assets/logo-dk.svg" />
|
|
5
|
+
<img src="https://youricons-3af51.web.app/assets/logo.svg" alt="youricons" width="240" />
|
|
6
|
+
</picture>
|
|
7
|
+
</a>
|
|
8
|
+
</p>
|
|
2
9
|
|
|
3
|
-
|
|
4
|
-
(grosor normal, esquinas normales):
|
|
10
|
+
<h1 align="center">youricons-svg</h1>
|
|
5
11
|
|
|
12
|
+
<p align="center">
|
|
13
|
+
Los iconos de <a href="https://www.npmjs.com/package/youricons">youricons</a> como <b>archivos <code>.svg</code> sueltos</b>, en sus 11 estilos.
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://www.npmjs.com/package/youricons-svg"><img src="https://img.shields.io/npm/v/youricons-svg?color=E8078F&label=npm" alt="versión en npm" /></a>
|
|
18
|
+
<a href="https://github.com/cirilojesus/youricons/blob/master/LICENSE"><img src="https://img.shields.io/npm/l/youricons-svg?color=25264F&label=licencia" alt="licencia MIT" /></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
<p align="center">
|
|
22
|
+
<img src="https://youricons-3af51.web.app/assets/readme/estilos.svg" alt="Los 11 estilos" width="100%" />
|
|
23
|
+
</p>
|
|
24
|
+
|
|
25
|
+
## ¿Es este el paquete que necesitas?
|
|
26
|
+
|
|
27
|
+
| Quieres… | Usa |
|
|
28
|
+
|---|---|
|
|
29
|
+
| Poner un icono con `<img>`, como fondo o máscara en CSS, o usarlo en Figma, Illustrator, Keynote… | **`youricons-svg`** (este) |
|
|
30
|
+
| Iconos en React, Vue, Angular, React Native, HTML con `<yi-icon>` o como fuente (`<i class="yi yi-home">`) | [`youricons`](https://www.npmjs.com/package/youricons) |
|
|
31
|
+
| Iconos en Android o iOS nativos | [`youricons-native`](https://www.npmjs.com/package/youricons-native) |
|
|
32
|
+
|
|
33
|
+
Estos archivos vienen con el grosor y las esquinas normales. Si los necesitas con otro grosor o con otras esquinas,
|
|
34
|
+
usa `youricons` o cópialos desde [la web](https://youricons-3af51.web.app), que te deja ajustarlos antes de copiar.
|
|
35
|
+
|
|
36
|
+
## Instalación
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm i youricons-svg
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
O sin instalar nada, desde el CDN:
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
https://cdn.jsdelivr.net/npm/youricons-svg/dist/outline/home.svg
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Dónde está cada icono
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
youricons-svg/dist/<estilo>/<nombre>.svg
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
| Estilo | Carpeta | Ejemplo |
|
|
55
|
+
|---|---|---|
|
|
56
|
+
| Contorno | `outline` | `dist/outline/home.svg` |
|
|
57
|
+
| Relleno | `solid` | `dist/solid/home.svg` |
|
|
58
|
+
| Dos tonos | `duotone` | `dist/duotone/home.svg` |
|
|
59
|
+
| Pixel art | `pixel` | `dist/pixel/home.svg` |
|
|
60
|
+
| Dibujado a mano | `sketch` | `dist/sketch/home.svg` |
|
|
61
|
+
| Tinta | `ink` | `dist/ink/home.svg` |
|
|
62
|
+
| Inflado | `bubble` | `dist/bubble/home.svg` |
|
|
63
|
+
| Con sombra | `shadow` | `dist/shadow/home.svg` |
|
|
64
|
+
| 3D | `3d` | `dist/3d/home.svg` |
|
|
65
|
+
| Neón | `neon` | `dist/neon/home.svg` |
|
|
66
|
+
| Degradado | `gradient` | `dist/gradient/home.svg` |
|
|
67
|
+
|
|
68
|
+
Los nombres van en minúsculas y con guiones (`arrow-left`, `shopping-cart`). Búscalos en
|
|
69
|
+
**[la web](https://youricons-3af51.web.app)**.
|
|
70
|
+
|
|
71
|
+
## Cómo usarlos
|
|
72
|
+
|
|
73
|
+
### Con `<img>`
|
|
74
|
+
|
|
75
|
+
```html
|
|
76
|
+
<img src="node_modules/youricons-svg/dist/outline/home.svg" width="24" height="24" alt="Inicio" />
|
|
6
77
|
```
|
|
7
|
-
|
|
78
|
+
|
|
79
|
+
Con `<img>` el icono sale **negro** (el navegador no le pasa el color del texto). Para elegir el color, usa la
|
|
80
|
+
máscara de CSS de abajo o pega el SVG dentro del HTML.
|
|
81
|
+
|
|
82
|
+
### Como máscara en CSS (con el color que quieras)
|
|
83
|
+
|
|
84
|
+
```css
|
|
85
|
+
.icono-inicio {
|
|
86
|
+
display: inline-block;
|
|
87
|
+
width: 24px;
|
|
88
|
+
height: 24px;
|
|
89
|
+
background-color: currentColor; /* el color del icono: el del texto, o el que pongas */
|
|
90
|
+
-webkit-mask: url('youricons-svg/dist/outline/home.svg') center / contain no-repeat;
|
|
91
|
+
mask: url('youricons-svg/dist/outline/home.svg') center / contain no-repeat;
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
```html
|
|
96
|
+
<span class="icono-inicio" style="color: #E8078F"></span>
|
|
8
97
|
```
|
|
9
98
|
|
|
10
|
-
|
|
99
|
+
### Pegado dentro del HTML
|
|
100
|
+
|
|
101
|
+
Abre el archivo, copia su contenido y pégalo en tu HTML. Así toma el color del texto (`currentColor`) y puedes
|
|
102
|
+
cambiarle el tamaño con `width` y `height`.
|
|
103
|
+
|
|
104
|
+
### Con un bundler (Vite, webpack…)
|
|
105
|
+
|
|
106
|
+
```js
|
|
107
|
+
import homeUrl from 'youricons-svg/dist/outline/home.svg';
|
|
108
|
+
|
|
109
|
+
img.src = homeUrl;
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### En herramientas de diseño
|
|
113
|
+
|
|
114
|
+
Arrastra los archivos de `dist/<estilo>/` a Figma, Sketch, Illustrator, Keynote o PowerPoint.
|
|
115
|
+
|
|
116
|
+
---
|
|
11
117
|
|
|
12
|
-
|
|
13
|
-
|
|
118
|
+
<p align="center">
|
|
119
|
+
<a href="https://youricons-3af51.web.app">Ver todos los iconos</a> ·
|
|
120
|
+
<a href="https://www.npmjs.com/package/youricons">youricons</a> ·
|
|
121
|
+
<a href="https://github.com/cirilojesus/youricons">GitHub</a> ·
|
|
122
|
+
Licencia MIT
|
|
123
|
+
</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "youricons-svg",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Los iconos de youricons como archivos SVG sueltos: 11 estilos (outline, solid, duotone, pixel, sketch, ink, bubble, shadow, 3d, neon, gradient).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/cirilojesus/youricons#readme",
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"youricons"
|
|
20
20
|
],
|
|
21
21
|
"exports": {
|
|
22
|
+
"./dist/*": "./dist/*",
|
|
22
23
|
"./*": "./dist/*",
|
|
23
24
|
"./package.json": "./package.json"
|
|
24
25
|
},
|