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

75
Visualizações
react-jsonschema-form styling form elements

As in the title can I style the inputs and labels directly in the schema via classNames props? If so than how? I have a following schema

  const uchema: JSONSchema7 = {
    type: "object",
    properties: {
      linkdata: {
        title: "Paste Link Here",
        type: "string",
      },
    },
    required: ["linkdata"],
  };

  const uiSchema: UiSchema = {
    linkdata: {
      "ui:autofocus": true,
      classNames: "flex flex-col my-4",
    },
    "ui:submitButtonOptions": {
      props: {
        disabled: true,
        className:
          "bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 border border-gray-400 rounded shadow",
      },
      norender: false,
      submitText: "Send",
    },
  };

the problem is that the submit button does not accept those tailwind classes, I still have

class="btn btn-info"

Do I need to make custom component for the field and for the label and for the button and every element I would like to use with it?

Thanks

about 4 years ago · Juan Pablo Isaza
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