I've been using Buefy for about a year for two projects and it provides a nice set of drop-in components for projects within the niche of Bulma/VueJS users. The project is very well designed and documented and easy to customize. Note: The original author, @rafaelpimpa, recently transferred maintenance over to jtommy.
If you happen to fall within the aforementioned niche, Buefy is definitely worth a try. The Form components alone are worth their weight in kilobytes and greatly simplify your templates. The components, props, and events use logical naming conventions and the examples in the docs work out of the box and are easy to customize.
I love how readable this is as opposed to a series of nested divs and classes:
I get the feeling that Buefy's approach is to use custom elements instead of native elements? So something like an <input> element becomes some <b-field> thing?
I am sceptical if that is a good thing. I would not want to swap out all regular html for some fantasy elements of a library.
A grouping of form controls and labels that together represent a piece of form data is a field. True, HTML doesn't have any exact `field` tag, but the notion of a field has always been there, see `<fieldset>`. Working with custom "fantasy" elements is quite typical of modern frontend development, and very productive to work in.
Nevertheless, in the more restricted question of using custom elements to replace CSS classes, you may have a point; many libraries that try to do this typically end up with a far more restricted use case since a custom components library is less open to extension than CSS classes, and custom components authors often fail to anticipate ways in which CSS frameworks are used. (e.g. using a CSS class with a standard HTML tag, and then, using a CSS class with a custom component)
This isn't quite analogous. Developers use custom components because they encapsulate a common structure in Web apps not provided out of the box in vanilla HTML.
To use a more accurate analogy, they are akin to building an ALU with the use of a an adder (a fantasy component abstracting away the NAND gates) rather than completely in NAND gates.
In the original link, the Buefy project describes itself as "Lightweight UI components for Vue.js based on Bulma". It seems like b-field is an example of such a component [0]. Looking at the documentation, this seems to be the case. If you're familiar with components in Vuejs, this is just a component in Vuejs.
Buefy uses the class naming conventions established in Bulma. Since it's Vue, you can bind the values to data and change the classes dynamically to quickly toggle the error state and messages.
What's the alternative to declaring our UI using pseudo-html elements and string-matching on css class proxies from the currently-in-favour CSS framework which sits on top of the javascript framework of the moment which, after going through several transpilation steps to become plain old javascript, then sits on the client manipulating a shadow-DOM, to finally render plain old html?
No idea. Hopefully some nice solutions will arise from other languages which compile to wasm - I would expect all the major players to be looking at coming up with something to that effect now that the world seems ready for Silverlight 2.0 and everyone loves writing frameworks.[1]
Until then, any solution will unfortunately probably involve adding yet another level to the house of cards, maybe one which compiles down to buefy or the Vue bootstrap components..
[1] yeah, I see the irony in that it's just another stack which will probably be just as insane in many ways, but at least it will compile in less than 5mins.
Just want to shoutout bulma and buefy as a user. I used bulma for a side project and had to write very little custom css. Best feature for me for bulma is that you can just override the colors with sass variables. Not as fully featured with things as other frameworks (bootstrap), but covers a ton of use cases.
Buefy is definitely interesting, and if your site is more geared towards mostly-read content something like this or bootstrap may work better. For more application-like features, I'm much more a fan of React with material-ui.
A beginner question as someone who just started fiddling around with frontend development. I'm currently using Vue and Bulma but I got it with "npm install bulma" and not via these components. What's the advantage of using this over just using the "normal" Bulma with the normal tags and just using the Bulma class names?
It's a neat layer of abstraction, you don't have to remember or write as many classes. Form elements are handled conveniently too, with v-model bindings.
I'm no expert on frontend techstacks, but I thought Vue was an application development framework, not what-looks-here like a jQuery replacement for DOM validations and manipulation?
As far as I can see, it is basically doing almost exactly what jQuery does in Bootstrap...can someone perhaps set me straight with this?
Used the library for a bunch of production projects for clients, it's great. Allows you to work fast. Has a better look than the material or bootstrap templates that are all too common.
I think they mean that the library has no dependencies (it doesn't inflate your node_modules) and the components themselves are drop-in (no setup/bootstrapping).
The HN guidelines call for changing the original title when it is either misleading or linkbait (https://news.ycombinator.com/newsguidelines.html). When users complain that part of a title is misleading, we usually change it, especially when there's a bit of baitiness in there too.
A lot of projects/products get posted to HN with promotional titles. If we always went with their own descriptions, HN's front page would be a lot noisier and less to our readers' taste. They prefer factual and neutral language.
It's true that the word 'lightweight' in the title above wasn't that bad, but if one reader complains, it's likely that some others feel the same way. We've learned to trust such community reactions.
This integrates bulma css components into vue’s JavaScript framework, so you don’t need to write the html/JavaScript code that displays, say, a dialog prompt, you can just write `Dialog.alert(“hey”)`
If you happen to fall within the aforementioned niche, Buefy is definitely worth a try. The Form components alone are worth their weight in kilobytes and greatly simplify your templates. The components, props, and events use logical naming conventions and the examples in the docs work out of the box and are easy to customize.
I love how readable this is as opposed to a series of nested divs and classes:
If you only need one or two components you can import where needed: