Select to view content in your preferred language

Avenir Next Font React App

3440
2
Jump to solution
05-08-2023 03:13 PM
Labels (2)
awatson32
Occasional Contributor

I created wireframes in Figma using the UI Kit, and I'm getting started on building the app in React. I'm looking to use the Avenir Next typeface used by Calcite, but I can't find much information on usage or how to include it in my project. Any direction is appreciated. 

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
coryeicher
Frequent Contributor
Calcite has many .css variables which let you override its defaults. For
example, if you want to change the Calcite font, you can set this one:

--calcite-sans-family

But, it sounds like you instead wish to use the Avenir font _elsewhere_ in
your application? If that's the case, one way is to import Avenir like this:

@import url('
https://fonts.googleapis.com/css2?family=Avenir:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap'
);

There are some good resources on the web which go into more detail on this
approach.

Hope this helps,

-Cory
CORY EICHER
www.eichcorp.com
cory@eichcorp.com

View solution in original post

0 Kudos
2 Replies
coryeicher
Frequent Contributor
Calcite has many .css variables which let you override its defaults. For
example, if you want to change the Calcite font, you can set this one:

--calcite-sans-family

But, it sounds like you instead wish to use the Avenir font _elsewhere_ in
your application? If that's the case, one way is to import Avenir like this:

@import url('
https://fonts.googleapis.com/css2?family=Avenir:ital,wght@0,300;0,400;0,600;0,700;1,400&display=swap'
);

There are some good resources on the web which go into more detail on this
approach.

Hope this helps,

-Cory
CORY EICHER
www.eichcorp.com
cory@eichcorp.com
0 Kudos
awatson32
Occasional Contributor

Thank you! Yes, I was having a hard time finding a good source for the Avenir font. Appreciate it.

0 Kudos