Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

206
Vistas
How to handle urls with nextjs and chakra-ui?

When we use react linkify directly with chakra-ui (eg.Text) components, we cannot handle the link.

Problematic use case

import Linkify from 'react-linkify';
import {Box, Text} from '@chakra-ui/react';

export default function Usage(){

return (
 <Linkify>
  <Text>https://stackoverflow.com</Text>
 </Linkify>
);

};
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Solution is;

Create Linkify.js

Linkify.js file:

import { Link } from '@chakra-ui/react';
import ReactLinkify from 'react-linkify';

const componentDecorator = (href, text, key) => (
  <Link
    href={href}
    key={key}
    isExternal={true}
    color="blue.500"
    _focus={{ outline: 'none' }}
  >
    {text}
  </Link>
);

export const Linkify = (props) => {
  return <ReactLinkify {...props} componentDecorator={componentDecorator} />; };

Import new Linkify Component to the file.

Usage

import { Linkify } from './Linkify';
import { Text } from '@chakra-ui/react';

export default function Usage(){
 return(
 <Linkify>
  <Text>https://stackoverflow.com</Text>
 </Linkify>
 )
}

Problem Solved! Thanks...

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda