Search
 
SCRIPT & CODE EXAMPLE
 

TYPESCRIPT

add google font in tailwind css

//add neccessary font in globalstyled.css which is import in main file
//globalStyle.css
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@200;300;500;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,200;0,300;0,400;0,700;1,100;1,500&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;800&family=Raleway:ital,wght@0,200;0,300;0,400;0,700;0,900;1,100;1,500&display=swap')
//in tailwind.config.js
module.exports = {
  content: ['./src/**/*.{js,jsx,ts,tsx}'],
  theme: {
    extend: {
      fontFamily: {
        Montserrat: ['Montserrat', 'sans-serif'],
        Raleway: ['Raleway', 'sans-serif'],
      }, //end of fontFamily
    },
  },
  plugins: [],
}


//and you can use in any where
<button className="font-Raleway">Learn how</button>
Comment

PREVIOUS NEXT
Code Example
Typescript :: setstate typescript type 
Typescript :: adonis query count 
Typescript :: prevent row click event when button is clicked angular html 
Typescript :: react native navigation current screen 
Typescript :: response.json results in pretty data python 
Typescript :: formGroup dependency for module.ts 
Typescript :: Bulk Products Selection on sales process odoo 
Typescript :: helm + if + not exists default true 
Typescript :: concat array to an array only unique values in angular 
Typescript :: google chrome extensions content scripts matches 
Typescript :: shortcuts for ajax in vscode 
Typescript :: google sheets empty functions 
Typescript :: roblox finding points around a circle using radius, center, and angle 
Typescript :: clinical thermometer consists of a long, narrow, uniformclinical thermometer consists of a long, narrow, uniform 
Typescript :: how to run typescript in vscode 
Typescript :: react typescript display firebase timestamp as date 
Typescript :: react app with typescript 
Typescript :: squash commits in remote branch 
Typescript :: value of input in typescript 
Typescript :: pub schedule firebase 
Typescript :: typescript add to array 
Typescript :: cannot be loaded because running scripts is disabled on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170. 
Typescript :: cube numbers list 
Typescript :: find number of digits in a number 
Typescript :: circle dot in latex 
Typescript :: append to array mongoose updateone 
Typescript :: typescript method comments 
Typescript :: difference between test strategy vs test plan 
Typescript :: __redux_devtools_extension_compose__ typescript 
Typescript :: how to check if elements dont exist in testing library 
ADD CONTENT
Topic
Content
Source link
Name
1+3 =