Giter VIP home page Giter VIP logo

mbehzad-bhz / tw-bootstrap-grid-optimizer Goto Github PK

View Code? Open in Web Editor NEW
11.0 1.0 0.0 287 KB

The `tw-bootstrap-grid-optimizer` plugin is an advanced utility tool for optimizing the grid system in web development projects using TailwindCSS. Inspired by the flexibility and ease of use of the Bootstrap Grid system, this module brings similar functionality to your TailwindCSS projects.

License: MIT License

JavaScript 41.54% HTML 7.41% TypeScript 50.68% SCSS 0.38%

tw-bootstrap-grid-optimizer's Introduction

Tailwind Bootstrap Grid Optimizer

Description

  • Tailwind CSS is an incredibly powerful framework for building user interfaces with utility-first CSS. However, one aspect that some developers find lacking is its approach to a grid system, particularly those coming from the Bootstrap ecosystem and are accustomed to its grid system's flexibility and ease of use.
  • The tw-bootstrap-grid-optimizer is designed specifically to address this need. It is a utility tool for Tailwind CSS that integrates the best features of the Bootstrap grid system. This means you can harness the flexibility and responsiveness of Bootstrap's grid, while still benefiting from the utility-first methodology and customization options that Tailwind CSS provides.

Installation

npm i tw-bootstrap-grid-optimizer

Configuration

First, require the module in your Tailwind CSS configuration file:

module.exports = withMT({
    content: ['./src/**/*.{js,jsx,ts,tsx,css,scss}', './index.html'],
    darkMode: 'media', // or 'media' or 'class',
    development: true,
    mode: "jit",
    theme: {
        extend: {},
    },
    variants: {
        extend: {},
    },
    plugins: [
        require('tw-bootstrap-grid-optimizer')
    ],
});

Usage

function App() {
    return (
        <>
            <div className="container bg-red-600 text-center">
                <div className="row">
                    <div className="sm:col-6 md:col-4">Column 1</div>
                    <div className="sm:col-6 md:col-4">Column 2</div>
                    <div className="sm:col-6 md:col-4">Column 3</div>
                </div>
            </div>
        </>
    )
}
function App() {
  return (
    <div className="container">
      <div className="row">
        <div className="sm:col-12 md:col-8">
          <table className="table-auto w-full">
            <thead>
              <tr>
                <th className="border px-4 py-2">Name</th>
                <th className="border px-4 py-2">Age</th>
                <th className="border px-4 py-2">Email</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td className="border px-4 py-2">John Doe</td>
                <td className="border px-4 py-2">30</td>
                <td className="border px-4 py-2">[email protected]</td>
              </tr>
              <tr>
                <td className="border px-4 py-2">Jane Doe</td>
                <td className="border px-4 py-2">25</td>
                <td className="border px-4 py-2">[email protected]</td>
              </tr>
            </tbody>
          </table>
        </div>
        <div className="md:col-4 hidden sm:block">
          <div className="p-4 bg-blue-300">Sidebar content here</div>
        </div>
      </div>
    </div>
  );
}

Author

Majid Behzadnasab

Pooria Noruzi

Contributing

If you find a bug or have a feature request, please open an issue on GitHub. Contributions are always welcome!

License

This project is licensed under the MIT License.

tw-bootstrap-grid-optimizer's People

Contributors

mbehzad-bhz avatar

Stargazers

Developers of ultraDevs avatar Artur Sponchiado avatar armin safaie avatar Vitaly Chernov avatar  avatar max avatar Douglas M. Barcellos avatar  avatar  avatar Pooria Noruzi avatar  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.