GithubHelp home page GithubHelp logo

core's Introduction

VariantJS Core

core's People


alfonsobries avatar jaulz avatar


Syntrax avatar VALERIY SINEVICH avatar Ali Doğu avatar Hugo Heneault avatar Asım Tahir avatar Wyatt Herkamp avatar Erik  avatar Donald Chea avatar Don Chea avatar Stephen Khoo avatar BarbareCode avatar Lucas Maximiliano Marino avatar Lee Overy avatar Lucas Yang avatar Julian Hundeloh avatar Alfonso Bribiesca avatar


James Cloos avatar


jaulz kayjisan

core's Issues


Not sure if you already thought about it but I think it would help to create a mono repository to keep the overview (at least for the core, react and vue repositories). What do you think?


Is this still actively being worked on?

Yarn or npm?

While working on a PR I noticed that you used npm and yarn since both lock files are present. Which is your current preference?

Props Presets

From my point of view, some components have more configuration states than just variant. According to #8 multiple variants makes it too difficult to maintenance the classesList which I total agree.

Maybe a solution could be presets for each prop. I try to explain the idea based on this configuration example, and I created a small repository to demonstrate it as a working demo. Here is the link:


export const theme: VariantJSConfiguration = {
  'TButton': {
    preset: {
      size: {
        large: 'p-20',
        default: 'p-10'
      color: {
        primary: 'bg-blue-500',
        secondary: 'bg-yellow-500'
    variants: {
      outline: {
        preset: {
          color: {
            primary: 'border-blue-500',
            secondary: 'border-yellow-500'
        classes: {
          default: 'border border-solid'
    fixedClasses: {
      default: 'btn'

What do you think?

Merge classes and classList

As far as I can see the passed classes are not merged into classList:

What is the expected behaviour? Should the passed classes override the classes in classList or should they be merged (my preference)?

Pass multiple variants to component

What do you think about passing multiple variants to a component? They could be separated by spaces (just like CSS classes) and then you could combine them as necessary, e.g. for a button: "icon sm", "primary lg" etc.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.