https://github.com/zebradevs/zeta-icons
An icon library for the Zeta design system.
https://github.com/zebradevs/zeta-icons
flutter icons ts web zeta
Last synced: 6 months ago
JSON representation
An icon library for the Zeta design system.
- Host: GitHub
- URL: https://github.com/zebradevs/zeta-icons
- Owner: ZebraDevs
- License: mit
- Created: 2024-07-03T13:21:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-05T16:46:15.000Z (10 months ago)
- Last Synced: 2024-12-06T21:12:11.012Z (10 months ago)
- Topics: flutter, icons, ts, web, zeta
- Language: Dart
- Homepage: https://zeta-icons.web.app
- Size: 44.1 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.MD
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# zeta-icons
An icon library for the Zeta design system.
# Web
> 🚧 **Note**: Currently, the only way to use these icons is directly from `zeta-icons`. This will change in the future with the impending release of `zeta-web` and `zeta-react`.
## Installation
Zeta Icons is hosted on [npm](https://www.npmjs.com/package/@zebra-fed/zeta-icons), and can be installed with:
`npm i @zebra-fed/zeta-icons`
## Usage
The zeta-icons fonts can be imported into any web project. There are two variants, `zeta-icons-round` and `zeta-icons-sharp`, for round and sharp icons respectively.
Either one or both of these need to be imported via css```css
@font-face {
font-family: zeta-icons-round;
font-weight: bold;
src: url("@zebra-fed/zeta-icons/font/zeta-icons-round.woff2");
}.icon {
font-family: "zeta-icons-round";
line-height: 1;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-feature-settings: "liga";
}
```If you are not using a framework that optimizes node modules imports, you may need to point directly to the font:
```css
src: url("./node_modules/@zebra-fed/zeta-icons/outputs/font/zeta-icons-round.woff2");
```Zeta icons use **_ligatures_**, which allows for the icons to be rendered by simply entering their name. These icons behave as text characters, and so are styled as such:
```html
alarm
```---
# Flutter
Zeta Icons for Flutter are part of [zeta_flutter](https://github.com/ZebraDevs/zeta_flutter).
## Installation
Zeta flutter is hosted on [pub.dev](https://pub.dev/packages/zeta_flutter/), and can be installed with:
`flutter pub add zeta_flutter`
## Usage
The `ZetaIcons` class contains all the zeta icons, in both round and sharp variants.
These can be displayed using the `Icon` class built into Flutter.```dart
Icon(ZetaIcons.activity_round, color: Colors.red, size: 24)
```---
Testing
> 🚧 **Note**: This does not work with all versions of node - tested and working with node 18.17.0
Before any tests are ran, make sure to create an `env.test.local` file with the value of `FIGMA_ACCESS_TOKEN` set to a Figma token which has access to the [ZDS Assets Figma](https://www.figma.com/file/VQ7Aa3rDYB7mgpToI3bZ4D/%F0%9F%A6%93-ZDS---Assets?type=design&mode=design&t=Ry8n3GUYc8uvxhMt-0) and the [Test Figma](https://www.figma.com/file/oIiGXVNKX4KjppcGxOEbZa/IconsTestPage?type=design&node-id=156-1674&mode=design&t=pBj7y8J7b6q906it-0).
To test the functionality of the scripts against a test Figma file with a subset of the icons, run
`npm run test`
and inspect the outputs in test/outputs/test-figma.
To run a full test against the ZDS Assets Figma, run
`npm run test:build`
and inspect the outputs in test/outputs/zds.
## Licensing
This software is licensed with the MIT license (see [LICENSE](./LICENSE)).