Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/riderx/capitalize-first-tailwind
tailwind utility to capitalise only first letter of string
https://github.com/riderx/capitalize-first-tailwind
tailwindcss
Last synced: about 2 months ago
JSON representation
tailwind utility to capitalise only first letter of string
- Host: GitHub
- URL: https://github.com/riderx/capitalize-first-tailwind
- Owner: riderx
- License: mit
- Created: 2021-08-05T10:29:17.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-02T17:57:47.000Z (over 2 years ago)
- Last Synced: 2024-07-23T19:01:08.806Z (2 months ago)
- Topics: tailwindcss
- Language: JavaScript
- Homepage:
- Size: 88.9 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tailwind Capitalize first letter
> tailwind utility to capitalize only first letter of string
Install the plugin from npm:
```
$ npm install tailwind-capitalize-first-letter
```Then add the plugin to your `tailwind.config.js` file:
```js
// tailwind.config.js
module.exports = {
// ...
plugins: [
// ...
require('tailwind-capitalize-first-letter'),
// ...
],
};
```This plugin will generate following CSS:
```css
/* ... */
.capitalize-first:first-letter {
texttransform: uppercase;
}
/* ... */
```## Usage
```html
the first letter will always be uppercased!
the first letter will be uppercased onmd
screens and up.
the first letter will be uppercased on hover.
```## License
Capitalize first letter is licensed under the MIT License.
## Credits
Created with [create-tailwind-plugin](https://github.com/Landish/create-tailwind-plugin).
Inspired by [simonswiss](https://github.com/tailwindlabs/tailwindcss/discussions/1745#discussioncomment-145597)