├── .gitignore ├── LICENSE ├── README.md ├── index.js └── package.json /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Nathan Heffley 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Tailwind Card Plugin 2 | 3 |
7 | 8 | ## Installation 9 | 10 | Simply require the plugin in your project: 11 | 12 | ``` 13 | # With NPM 14 | npm install @nathanheffley/tailwindcss-card --save-dev 15 | 16 | # With Yarn 17 | yarn add @nathanheffley/tailwindcss-card --dev 18 | ``` 19 | 20 | ## Usage 21 | 22 | To get started using the plugin, you can simply add require it in your Tailwind config file. 23 | 24 | ```js 25 | // tailwind.config.js 26 | module.exports = { 27 | plugins: [ 28 | require('@nathanheffley/tailwindcss-card'), 29 | ], 30 | } 31 | ``` 32 | 33 | You will now have access to all the card components with their default settings. These match up with the [stacked example card](https://tailwindcss.com/docs/examples/cards#stacked) in the official Tailwind documentation. 34 | 35 | To maintain as light of a touch as possible, the components added are as follows: 36 | 37 | ```css 38 | .card 39 | .card-image 40 | .card-content 41 | ``` 42 | 43 | These classes can be used to form the basic structure of a card. You can use as many `card-image` images and `card-content` elements within a `card` as you want, in any order. 44 | 45 | ```html 46 |