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

237
Views
How can I customize the Mapbox autocomplete input my way?

I'm doing a project that uses Mapbox. Used as auto-complete and user location functions, it's exactly what I need and it works the way I need it.

But I would like to style these elements, or at least put these functions in the fields I already have. But I am not able to do this at all.

How could I style these elements with some freedom?

In the screenshot attached has the auto-complete and the field I want to put it in, in addition to the location button at the bottom that I want to style following the project's visual pattern.

I've tried selecting elements after inspecting by browser and styling by classes by css, but unfortunately it didn't work.

I've also read their documentation and unfortunately I didn't find anything about them either.

Screenshot of my website

map.addControl(
  new MapboxGeocoder({
    accessToken: mapboxgl.accessToken,
    mapboxgl: mapboxgl,
    placeholder: "Para onde iremos?",
  })
);
section header input {
  border: 1px solid var(--bg);
  border-radius: 50px 0 0 50px;
  color: var(--color-text);
  background: var(--bg);
  padding: 1rem;
  width: 100%;
  font-size: 1.125rem;
  text-overflow: ellipsis;
}
<header>
  <div id="barra-pesquisa">
    <input id="searchTextField" type="text" placeholder="Para onde iremos?" autocomplete="on" />
    <button id="criar-rota">Ir</button>
  </div>
</header>

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