logoalt Hacker News

Customizable HTML Select

210 pointsby dsegoyesterday at 12:13 PM128 commentsview on HN

Comments

prmphyesterday at 7:39 PM

So after decades of developer pain, all we're getting is a better select?

Where is the native HTML datagrid (that supports sorting, filtering, paging, downloading, row/column freezing, column resizing and re-ordering)?

Where are the native HTML Tabs control? Image selector, resizer/cropper, and uploader? Toggle button? etc.

We can't even get text input to respect autocomplete directives properly. On the major browsers, giving your user id and password inputs nonsensical names seems to be required, along with numerous other hacks, to ensure that when a user is registering, the form is not auto-completed with saved passwords.

HTML is really holding us back right now.

show 18 replies
endemicyesterday at 6:30 PM

If this will stop the proliferation of terrible JavaScript implementations of <select>, I'm here for it.

show 4 replies
bityardyesterday at 7:30 PM

Ah, customizable for web developers, not end users.

(And yes, I'm still bitter about you all wrecking my scroll bars.)

show 2 replies
deancyesterday at 6:34 PM

I've been doing front-end since the days of IE5 and I'd be rich if I had a penny for every time I've had to do a custom "select". It's a pain to use third-party libraries for this, but it _is_ a solved problem and doesn't require that much extra code.

show 5 replies
CafeRaceryesterday at 10:35 PM

I spent days building this little perfect dropdown select thing, that is a hundreds lines of code and even more docs explaining what the hell is going on. Someone wasted the same amount of time before me. Someone else spent a lot of time before them. And so on.

I wish we have had more browser native implementations including some notion of virtual lists so the browser would not choke when rendering a lot of content.

---

Eventually, this would be same as border-radius. It will get implemented and we'll forget about that forever.

show 1 reply
akerstenyesterday at 8:37 PM

- Why is picker a function like `::picker(select)`, and not a CSS pseudo class like `::before` to select the `select`'s `picker` component? I.e., `select::picker` makes a lot more sense to me.

- What about multi-choice (`multiple` attribute) `select`s?

show 1 reply
no_wizardyesterday at 5:39 PM

They been talking about this for a long time.

In fact, I remember at some point, they were trying to sell the idea of exposing all the form inputs to use the `::part` API, since under the hood form inputs share the same general logic of custom elements, If I recall correctly.

From the looks of it, didn't work out that way though.

And I think its for the best. I like this proposal more, even though delivering the `::part` API to everyone (not just web component users) would have likely been faster

show 1 reply
Pesthufyesterday at 6:55 PM

I don’t really see if there’s now an option to further improve the select with JavaScript to add, for example, a search textbox for filtering.

And what about the nearly unusable (on desktop) <select multiple>?

show 3 replies
bushidoyesterday at 7:38 PM

This is a very good start, I don't think it'll replace a lot of the custom code/comboboxes that are seen in react-land without search (unless I missed it).

show 1 reply
paul_hyesterday at 8:27 PM

I've been griping about html's select for some tome - https://paulhammant.com/2013/01/31/appdev-glass-ceiling-revi... - great news

rererereferredtoday at 5:08 AM

Neat. Can I put an input inside the select so I can filter options?

show 2 replies
kirugantoday at 10:38 AM

HTML is getting complex every day

Sateeshmyesterday at 5:51 PM

What's the point of Chrome-only css.

show 5 replies
notatoadtoday at 12:39 AM

this is a huge win for accessability.

i've re-implemented select in worse and less-accessible ways many times to satisfy some business demand. i'm very excited if this means i don't have to keep doing that.

mattlondonyesterday at 10:27 PM

I worry this will lead to a bad user experience if android et al does not support it natively.

You'll have people saying "select the green option in the drop-down list to do <foo>" and people on mobile will just get the native-ui list with no styling.

mary-extyesterday at 10:16 PM

I'm hoping that the documentation around this will be good, I've recently tried out CSS anchor positioning and it's riddled with examples that no longer work as the specification has been changed various times

radoyesterday at 6:44 PM

Yes please, like everybody else I had to make a custom one https://radogado.github.io/n-select/ and will be happy to move to a rich standard

show 1 reply
teddyhyesterday at 5:47 PM

Now, what’s the <https://caniuse.com/> link to this feature?

show 2 replies
ge96yesterday at 5:20 PM

Yeah now if they can go ahead and make ThreeJS line thickness be more than 1 that'd be greeattttt....

edit: this is a joke about "OpenGL Core Profile with the WebGL renderer" which I'm not sure if Chrome (browser) would be responsible for

show 2 replies