Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

329
Views
Fuente primaria y secundaria con Chakra UI

Estoy usando Chakra Ui con React y estoy tratando de usar dos fuentes diferentes para dos componentes, ya las importé usando el método Global descrito en los documentos, pero ¿cómo puedo usar solo la fuente secundaria en mi componente actual?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Cuando te refieres a la secundaria, ¿supongo que esta es tu fuente secundaria? Si es así, hay dos cosas que debe tener en cuenta. Es la tecla textStyles y la función extendTheme de Chakra UI:

  1. Importe la función extendTheme importada desde Chakra UI.

     import { extendTheme } from "@chakra-ui/react"
  2. El uso de la función extendTheme le permitirá agregar nuevos estilos. Aquí es donde colocará la clave textStyles :

     const themeExample = extendTheme({ // Whatever you pass here will be ADDED to the theme. textStyles: { primary: { fontFamily: "Font Primary" }, secondary: { fontFamily: "Font Secondary" }, }, });
  3. Ahora que las fuentes deseadas están configuradas, son fácilmente accesibles:

     <Box textStyle='primary'>Component One</Box> <Box textStyle='secondary'>Component Two</Box>

Puede encontrar más información aquí: https://chakra-ui.com/docs/features/text-and-layer-styles

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!