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

674
Visualizações
How to set border-radius to ant design Select component

I am using ant design and I want to change border-radius of Select component but it is not working. The code is below. And i tried to classname method but it doesn't work.

import React from 'react'
import { Select } from 'antd'
const { Option } = Select;

const Dropdown = ({placeholder ,...restProps}) => {
 return (
 <Select
    style={style}
    {...restProps}
    placeholder={placeholder}
 >
 </Select>
 )
}

const style = {
 width: 450,
 borderRadius: '10px',
 margin:3
}
export default Dropdown;
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

If you inspect the element you could find that the style is going to the div with classname ant-select. But the border is set in the inner div element with classname ant-select-selector.

Ant Design doesnt give any prop to override the style for it, but you can override by using CSS.

you can wrap with a custom div and provide CSS to override the style set by ant. Example,

 <div className="my-select-container">
    <Select
     style={style}
     {...restProps}
     placeholder={placeholder}
    >
    </Select>
 </div>

and in CSS file,

.my-select-container .ant-select .ant-select-selector {
  border-radius:20px;
}
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