76

As you know Bootstrap RC 1 is here, and I have been reading about all the new awesome features in this new framework. But guess what, typehead is out of the documentation. Does anyone know if this is for any reason?

I found these examples while googling and also I read in this post that they changed the typehead Bootstrap. So do I have to add it manually or is it also in the Bootstrap 3 bundle?

Does anyone know something about this?

4
  • 2
    I also found too many things gone such as nav classes, typeahead,controlled form input widths, search box, submenus. Changing classes to make it complex such as icon- to .glyphicon, span to col-lg-xxxxx? I would credit jquery in that regard or google policy I mean give enough backward compatibility so that people can stick to your product. Rather than imposing your idea just on others and judge in these words "We think that is not needed" Who are you to judge. So this change policy is more Microsoft stuff. They keep changing things and we developers always keep learning and wasting time. HELL! Sep 8, 2013 at 23:35
  • 1
    someone has added back the typeahead to Bootstrap 3 here
    – MK Yung
    Dec 20, 2013 at 4:48
  • This works with old bootstrap2 code without nodification. Just include the extra js file after the bootstrap 3 load.
    – giorgio
    Jan 10, 2014 at 2:36
  • This solved my problems with timschlechter.github.io/bootstrap-tagsinput/examples Thanks!
    – Lucia
    Jan 18, 2014 at 22:09

5 Answers 5

67

I believe it has been deprecated in favor of Twitter's excellent typeahead.js. Their documentation has a Bootstrap integration section that should help.

edit: Twitter has removed the integration instructions. It's not clear if this is temporary in advance of a Bootstrap 3.0-compatible release or if it's gone for good, but @drye links to a useful replacement at http://www.aureliomerenda.com/install-typeahead-bootstrap-3-fix-css-overlay-width-100/.

7
14

Now that the final Bootstrap 3.0.0 has been released, the typeahead has been officially removed. However, Twitter's Typeahead (https://github.com/twitter/typeahead.js) can be used in it's place:

Bootstrap 3 Typeahead example: http://bootply.com/86571

2
  • 1
    The github link returns a 404
    – User
    Feb 16, 2014 at 8:17
  • 1
    This is by far the best answer to this question. I gave it a shot and it worked like a charm.
    – Rahul Soni
    Jan 28, 2015 at 6:42
9

As ceejayoz already stated, you need the typeahead.js + the additional CSS for integrate with Bootstrap.

This is made for Bootstrap 2.

If you want it to work with Bootstrap 3, you have to change the .tt-hint class. I changed it to display: none; because it overlayed very terrible.

I also noticed that Button addons (to inputs) don't work that well because the input gets not correctly overridden too.

1
  • 1
    This post was helpful. that .tt-hint is strange popup with duplicate text from input control. Don't know what it was there. Setting display:none really helped out. thanks Sep 9, 2013 at 6:03
9

I found the adaption [may 2014] ;)

for others landing here from google like I did, still searching for the right answer: https://github.com/bassjobsen/Bootstrap-3-Typeahead

and if you need it working with knockout 3 like I do, I adapted the code from the genius Niemeyer ( https://stackoverflow.com/a/20503173/1218136 ) minimally to work again:

<input type="text" data-bind="value: value, typeahead: {source: your_array}" />
0
7

Yes, typeahead is deprecated in Bootstrap 3.

But typeahead.js is not ready for Bootstrap 3.

The working solution is to add the additional css, which repairs the css problems: https://github.com/jharding/typeahead.js-bootstrap.css

1

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.