Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

347
Visualizações
How can I put component inside the Particle.js?

I tried wrapping the Particle around the component but it does not work

import React from "react";
import { render } from "react-dom";
import Particles from "./Particles";
import "./index.css";
import Form from "./form";

const styles = {
  root: {
    fontFamily: "sans-serif",
    textAlign: "center",
    height: "100%",
    background: "#222",
    display: "flex",
    justifyContent: "center",
    alignItems: "center"
  }
};

const App = () => (
  <div style={styles.root}>
    <Particles>
      <Form />
    </Particles>
  </div>
);

render(<App />, document.getElementById("root"));

This is the recreated codesandbox link: https://codesandbox.io/s/particle-js-background-forked-woypk?file=/src/index.js:0-519

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

I've updated your CodeSandbox here: https://codesandbox.io/s/particle-js-background-forked-fsvhe?file=/src/form.js

I've updated the particles component, since you were using a deprecated package (react-particles-js).

The particles component doesn't support anything inside, you just place it inside other components and use CSS to position it correctly.

react-tsparticles, the updated particles component, is by default set to full screen, but in the example options I've set it to false to be contained only in the Form component

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda