Skip to content

Instantly share code, notes, and snippets.

@geotrev
Last active April 1, 2020 20:57
Show Gist options
  • Save geotrev/aeab6c3a5adcbf6c44991439e5f609f1 to your computer and use it in GitHub Desktop.
Save geotrev/aeab6c3a5adcbf6c44991439e5f609f1 to your computer and use it in GitHub Desktop.
Things To Consider in a UI library tool

Libraries for building UI have become all the rage. React, Vue, Stencil, LitElement, Svelte... the list goes on. Enabling developers to build UI easily and efficiently is a chief concern in the front end world, and the ecosystem is filled with options.

But what goes into a UI library? What defines the core features and capabilities of a UI library?

At the same token, what ISN'T the concern of a UI library? What are the "out of scope" features that other tools should handle?

Library Concerns:

  • Returns View Code: Writing a template that later becomes native to the platform. E.g., string template -> HTML.
  • Web Components: Ingests CSS: This is the opposite of the above - the library should intake CSS (only CSS, and not Sass or Less) for styling.
  • State: Internal state that informs the resulting UI
  • Composable: Connecting pieces (or components) together to form a larger interface or application-like experience.

External Concerns:

  • Rendering & DOM Insertion: There are a lot of ways to write view code, in addition to many templating languages.
  • Bundling: A UI library has no opinion on how the code looks or is compiled, just that the API is valid and the code runs in the environment (browser, native app, etc).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment