Installations
npm install inter-ui
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=16.0.0
Node Version
22.11.0
NPM Version
10.9.0
Score
99.9
Supply Chain
99.5
Quality
81
Maintenance
100
Vulnerability
93.6
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
CSS (59.05%)
SCSS (40.95%)
Developer
Download Statistics
Total Downloads
7,766,924
Last Day
7,558
Last Week
56,641
Last Month
254,237
Last Year
2,895,373
GitHub Statistics
114 Stars
137 Commits
7 Forks
4 Watching
2 Branches
10 Contributors
Package Meta Information
Latest Version
4.1.0
Package Id
inter-ui@4.1.0
Unpacked Size
5.92 MB
Size
5.90 MB
File Count
95
NPM Version
10.9.0
Node Version
22.11.0
Publised On
20 Nov 2024
Total Downloads
Cumulative downloads
Total Downloads
7,766,924
Last day
-26.2%
7,558
Compared to previous day
Last week
-10.9%
56,641
Compared to previous week
Last month
-1.7%
254,237
Compared to previous month
Last year
20.5%
2,895,373
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
1
The Inter Typeface (a npm distribution)
The CSS and web font files to easily self-host the Inter font family created by Rasmus Andersson.
This repository is just a means of more easily distributing the font. It tracks the releases of the main Inter repository as best as I am able. Note that this repository only contains the woff2
format but does generate and include latin-extended subsets for each font.
SCSS files are also available for use with the Sass preprocessor. The font-display
property can be overridden by setting $inter-font-display
to a valid font-display
value before importing the desired .scss
file.
Quick start
1npm install --save inter-ui
SCSS
Add the following to your SCSS to use the variable font with a non-variable fallback:
1@use "~inter-ui/default" with ( 2 $inter-font-display: swap, 3 $inter-font-path: '~inter-ui/web' 4); 5 6@use "~inter-ui/variable" with ( 7 $inter-font-display: swap, 8 $inter-font-path: '~inter-ui/variable' 9); 10 11@include default.all; 12@include variable.all; 13 14html { font-family: "Inter", "system-ui"; } 15 16@supports (font-variation-settings: normal) { 17 html { font-family: "InterVariable", "system-ui"; } 18}
Note that this @use
syntax is not currently supported in the node-sass or ruby sass implementations. We recommend using the primary sass implementation: dart sass.
JS/CSS
We have pre-built CSS files that you can include directly (with font-display
being swap
).
Add the following to your script:
1import "inter-ui/inter.css"; 2// Or use one of those versions: 3// import "inter-ui/inter-latin.css"; // A subset of only English alphabet characters 4// import "inter-ui/inter-display.css"; // The display font is optimised for XL text 5// import "inter-ui/inter-display-latin.css"; 6// import "inter-ui/inter-variable.css"; 7// import "inter-ui/inter-variable-latin.css";
Add the following to your stylesheet:
1html { font-family: "Inter", "system-ui"; } 2 3@supports (font-variation-settings: normal) { 4 html { font-family: "InterVariable", "system-ui"; } /* If using the variable font */ 5}
Modular imports
To avoid having to import all "font faces". You can also use only some of them via SCSS.
If you only want 400 and 700 you can specify exactly this.
1@use "~inter-ui/default" as inter-ui with ( 2 $inter-font-path: "~inter-ui/web-latin" 3); 4@include inter-ui.weight-400; 5@include inter-ui.weight-700;
Versions
There are several versions you can choose from. To use them with the modules, just change the $inter-font-path
to e.g. Inter (web hinted)
or use the other pre-built CSS files.
Hinted vs Unhinted
As detailed in the main repo:
Inter font files comes in two versions:
- "unhinted" -- Without TrueType hints (the default)
- "hinted" -- With TrueType hints
The TrueType hints are used by ClearType on Windows machines where ClearType is enabled. This usually changes the appearance of the fonts and can in some cases increase the legibility of text.
Additionally, hints are little computer programs that takes up considerable disk space, meaning that font files with hints are larger than those without hints. This might be a consideration when using web fonts.
- SCSS use: set
$inter-font-path
toInter (web hinted)
orInter (web hinted latin)
- JS/CSS use: import
inter-ui/inter-hinted.css
orinter-ui/inter-hinted-latin.css
Latin
If you only need support for Latin characters, you can use this version. The normal Inter (web)
version average filesize is between 150kb and 100kb, the reduced Latin version is on average 30kb per font.
This was generated using glyphhanger. See package.json
for the build script.
- SCSS use: set
$inter-font-path
toInter (web latin)
orInter (web hinted latin)
- JS/CSS use: import
inter-ui/inter-latin.css
orinter-ui/inter-hinted-latin.css
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
- Info: project has a license file: LICENSE.txt:0
- Info: FSF or OSI recognized license: SIL Open Font License 1.1: LICENSE.txt:0
Reason
6 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
Found 4/29 approved changesets -- score normalized to 1
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'main'
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 5 are checked with a SAST tool
Score
2.5
/10
Last Scanned on 2024-12-16
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More