Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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 on md 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)