Giter VIP home page Giter VIP logo

elora's Introduction

Elora logo

Elora - A React component library for Tailwind

Elora is a component library built in TypeScript for React developers who use Tailwind in their projects. I wanted to create something that feels as quick and easy to use as slapping together HTML elements...only with JSX elements. :D

Demo

https://brettthurs10.github.io/elora

Prequisites

Tailwind will need to be installed for your React project. See instructions here: https://tailwindcss.com/docs/guides/create-react-app

Installation

Simply run 'npm install elora' to install to your React/Tailwind project.

Note: This library is still in it's infancy. Development works, but when you try to build your React app some stylings will be stripped since I'm using string concatination and PurceCSS doesn't know it should be kept.

Workaround: I've found using these instructions when creating your React app the stylings are kept after you run your build. https://www.oscarmarion.dev/articles/tailwind-react-cra Essentially these instructions show you how to bypass using CRACO in your config. Expect updates on this topic in the future.

Components

The button component is available now. More to come!

Usage

import React from 'react'
import Button from 'elora'

const myButton = () => {
  return (
    <Button
      customColor='green'
      className='border shadow border-green-800'
      buttonStyle='pill'
      onClick={() => alert('Bibbity bobbity boop')}
      name='EloraBtn'
    >
      <p>Click me</p>
    </Button>
  )
}

Button props:

See button props here https://github.com/BrettThurs10/elora/blob/main/src/Button/index.tsx

License

MIT © BrettThurs10

elora's People

Contributors

brettthurs10 avatar

Watchers

 avatar

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.