Coder Social home page Coder Social logo

eps1lon / preaction-bootstrap-clips Goto Github PK

View Code? Open in Web Editor NEW

This project forked from duhdugg/preaction-bootstrap-clips

0.0 2.0 0.0 17.02 MB

This is a small library of React components targeting Bootstrap v5. The primary intention of this project is to reduce the markup needed for commonly-used elements.

Home Page: https://duhdugg.github.io/preaction-bootstrap-clips/

License: MIT License

JavaScript 96.02% SCSS 3.98%

preaction-bootstrap-clips's Introduction

Preaction Boostrap Clips

This is a small library of React components targeting Bootstrap v5. The primary intention of this project is to reduce the markup needed for commonly-used elements.

Components provided by this library include:

  • Alert
  • Boilerplate
  • Card
  • Modal
  • Nav
  • NavBar
  • Spinner

Quick Start

The full documentation can be found in the styleguide with live, editable examples.

Installation

npm install --save-dev @preaction/bootstrap-clips

Important: bootstrap is a peerDependency of this library, and @popperjs/core is a peerDependency of bootstrap. You will need to install these in your project as well.

npm install --save-dev bootstrap @popperjs/core

Usage

// bootstrap as a peerDependency means you need to import bootstrap CSS yourself.
// This gives you the flexibility to choose a different build or theme, if you wish.
import 'bootstrap/dist/css/bootstrap.min.css'

// library css needs to be imported separately after bootstrap
import '@preaction/bootstrap-clips/dist/preaction-bootstrap-clips.css'

// component imports must be named, to allow shaking unused components from your bundle
import { Boilerplate, Card } from '@preaction/bootstrap-clips'

// this is an example of how your application may choose to use a simple template,
// using fractions to determine the width of cards in a row at different breakpoints
// see the full documentation for more examples
function App() {
  const cardWidths = { md: 1 / 2, lg: 1 / 3, xl: 1 / 4, xxl: 1 / 6 }
  return (
    <Boilerplate footer='Copyright (c) 2018-2021 Doug Elkin. All rights reserved.'>
      <div className='row'>
        <Card header='Alpha' headerTheme='green' column width={cardWidths}>
          <p>Greetings, Earthlings!</p>
        </Card>
        <Card header='Bravo' headerTheme='blue' column width={cardWidths}>
          <p>Howdy, Partner!</p>
        </Card>
        <Card header='Charlie' headerTheme='yellow' column width={cardWidths}>
          <p>Hey, Stranger!</p>
        </Card>
        <Card header='Delta' headerTheme='red' column width={cardWidths}>
          <p>Yo, Punk!</p>
        </Card>
      </div>
    </Boilerplate>
  )
}

License

Copyright (c) 2018-2021 Doug Elkin

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.