from Hacker News

Ask HN: Where can I find higher-level UI components?

by miguelrochefort on 4/20/22, 6:01 PM with 4 comments

There exists a lot of high-quality UI component libraries such as MUI, Bootstrap, ANT, Grommet, Chakra, Semantic UI, etc. These components typically map to primitive types:

    boolean -> checkbox / toggle button / visibility
    integer -> numeric input / slider
    enum -> drop down menu / radio buttons
    string -> text field
    date -> date picker
    array -> list view
    matrix -> table view
    bitmap -> image
    async promise -> loading indicator
    side effect -> button
But what about higher-level types, classes, and schemas? Where can I find UI components that map to a person, a place, an event, a product, a transaction, a movie, an album, a book, an article, or a comment? Shouldn't higher-level UI components exist for popular ontologies such as Schema.org? It seems absurd to manually reimplement these templates in every project, yet I can't seem to find any comprehensive library of such components.

Have I been searching in the wrong place or do such higher-level UI component libraries actually don't exist?

  • by miguelrochefort on 4/20/22, 6:20 PM

    The closest attempt at creating a directory of standard platform-agnostic UI templates I could find is this repository [0] associated with the Adaptive Cards project [1]. Unfortunately, it only contains a handful of templates.

    In practice, Google's Rich Results [2] seem to provide the most extensive set of templates aligned with Schema.org, but documentation is limited and they're not open source. Similarly, Wikipedia features thousands of high-quality infobox templates [3], but they're not readily usable outside of Wikipedia and might have limited utility in non-encyclopedic contexts.

    [0] https://github.com/microsoft/adaptivecards-templates

    [1] https://adaptivecards.io

    [2] https://developers.google.com/search/docs/advanced/structure...

    [3] https://en.wikipedia.org/wiki/Wikipedia:List_of_infoboxes

  • by PaulHoule on 4/20/22, 6:19 PM

    Aren't these idiosyncratic?

    For instance an online bookstore might have the following kinds of "person":

       an administrative user
       a customer
       an author
       a person who a book is about
       a contact at a vendor
    
    the same is true for some other application just the list of "classes" and essential attributes of those classes is different.