Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions packages/preview/use-tabler-icons/0.22.0/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024-2025 zyf722

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
61 changes: 61 additions & 0 deletions packages/preview/use-tabler-icons/0.22.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
> **Note**
>
> This project is greatly inspired by and mainly edited based on [typst-fontawesome](https://github.com/duskmoon314/typst-fontawesome).

<h2 align="center">
<img alt="use-tabler-icons" src="assets/banner.svg">
</h2>

Check warning on line 7 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L5-L7

Possibly inadequate alternative description for image: `use-tabler-icons`. Please add a short description to make this image more accessible.

A Typst library for [Tabler Icons](https://github.com/tabler/tabler-icons), a set of over 5800 free MIT-licensed high-quality SVG icons.

## Usage
### Install Font
Install [the webfont for Tabler Icons](https://docs.tabler.io/icons/libraries/webfont) before using this library. Or, if you are using Typst web app, simply upload the font file to your project.

> [!NOTE]
>
> Since Tabler Icons v3.36.0, filled icons have been separated into a different font file. If you want to use filled icons, make sure to install both the regular ` tabler-icons.ttf` and filled `tabler-icons-filled.ttf` font files.

Check warning on line 17 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L15-L17

GFM alert boxes are not supported on Typst Universe.

### Import the Library
#### Using the Typst Packages
You can install the library using the typst packages:
```typst
#import "@preview/use-tabler-icons:0.22.0": *
```

#### Manually Install
Just copy all files under [`src`](https://github.com/zyf722/typst-tabler-icons/tree/main/src) to your project and rename them to avoid naming conflicts.

Check warning on line 27 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L27

GitHub URL links to default branch: `https://github.com/zyf722/typst-tabler-icons/tree/main/src`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/zyf722/typst-tabler-icons/blob/main/src Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you use a perma link or a link to a specific branch for all linked resources? This will ensure they will always match this version of the package.


Then, import `lib.typ` to use the library:
```typst
#import "lib.typ": *
```

### Use the Icons
You can use the `tabler-icon` function to create an icon with its name:
```typst
#tabler-icon("calendar")
```

Or you can directly use the `ti-` prefix :
```typst
#ti-calendar()
```

As these icons are actually text with custom font, you can pass any text attributes to the function:
```typst
#tabler-icon("calendar", fill: blue)
```

Refer to [`gallery.pdf`](https://github.com/zyf722/typst-tabler-icons/tree/main/gallery/gallery.pdf) and [Tabler Icons website](https://tabler.io/icons) for all available icons.

Check warning on line 50 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L50

GitHub URL links to default branch: `https://github.com/zyf722/typst-tabler-icons/tree/main/gallery/gallery.pdf`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/zyf722/typst-tabler-icons/blob/main/gallery/gallery.pdf Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.

## Contributing
[Pull Requests](https://github.com/zyf722/typst-tabler-icons/pulls) are welcome!

It is strongly recommended to follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification when writing commit messages and creating pull requests.

### Github Actions Workflow
This package uses a daily run [Github Actions workflow](https://github.com/zyf722/typst-tabler-icons/tree/main/.github/workflows/build.yml) to keep the library up-to-date with the latest version of Tabler Icons, which internally runs [`scripts/generate.mjs`](https://github.com/zyf722/typst-tabler-icons/tree/main/scripts/generate.mjs) to generate Typst source code of the library and gallery.

Check warning on line 58 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L58

GitHub URL links to default branch: `https://github.com/zyf722/typst-tabler-icons/tree/main/.github/workflows/build.yml`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/zyf722/typst-tabler-icons/blob/main/.github/workflows/build.yml Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.

Check warning on line 58 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L58

GitHub URL links to default branch: `https://github.com/zyf722/typst-tabler-icons/tree/main/scripts/generate.mjs`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/zyf722/typst-tabler-icons/blob/main/scripts/generate.mjs Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have to do this, but I'd consider putting this section inside a deciated CONTRIBUTING.md file.


## License
[MIT](https://github.com/zyf722/typst-tabler-icons/tree/main/LICENSE)

Check warning on line 61 in packages/preview/use-tabler-icons/0.22.0/README.md

View check run for this annotation

Typst package check / @preview/use-tabler-icons:0.22.0

packages/preview/use-tabler-icons/0.22.0/README.md#L61

GitHub URL links to default branch: `https://github.com/zyf722/typst-tabler-icons/tree/main/LICENSE`. Consider using a link to a specific tag/release or a permalink to a commit instead. This will ensure that the linked resource always matches this version of the package. You can create a permalink here: https://github.com/zyf722/typst-tabler-icons/blob/main/LICENSE Alternatively you can also link to a local file. This is preferred if the linked file is already present in the submitted package.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could just link to the local file

Loading
Loading