From 01c1bb058d8d385db32866eac1671d9ab1473659 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my?= Date: Thu, 7 Nov 2024 15:37:14 +0100 Subject: [PATCH] docs: improve readme (fixes #2) --- README.md | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1c9f309..17e7094 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,35 @@ -# Statamic character counting field ![Statamic 3](https://img.shields.io/badge/statamic-3.x-blue.svg?style=flat-square) +# Statamic character counting field -[![StyleCI](https://styleci.io/repos/75275215/shield?branch=master)](https://styleci.io/repos/75275215) +![Statamic 3.0+](https://img.shields.io/badge/Statamic-3.0+-FF269E?style=for-the-badge&link=https://statamic.com) -An input field or textarea which shows the status of the length -with colored feedback on the input element. +> An input field or textarea which shows the status of the length +> with colored feedback on the input element. -![CharField](https://raw.githubusercontent.com/appswithlove/statamic-charfield/master/screenshot-v3.png) +## Installation + +Install with Composer: + + composer require appswithlove/statamic-charfield + +## Usage -## Configuration +Use the «Extended Section» field and choose the background you like in the blueprint editor. + +### Configuration | Option | Description | |---------------|----------------------------------------| | `input_type` | Choose between input or textarea | -| `min` | Minimal length | -| `max` | Maximal length | +| `low` | Minimal length | +| `high` | Maximal length | | `optimal_min` | Optional min length for optimal result | | `optimal_max` | Optional max length for optimal result | | `hard_limit` | Maxlength for input field | - - If the length is outside of min and max the color is **red**. - - If the length is between min and max but not between the optimal length **dark yellow** - - If the length is in the optional range or between min and max if no optimal length is provided the color is **green** +- If the length is outside of min and max the color is **red**. +- If the length is between min and max but not between the optimal length **dark yellow** +- If the length is in the optional range or between min and max if no optimal length is provided the color is **green** + +## Screenshot + +![CharField](https://raw.githubusercontent.com/appswithlove/statamic-charfield/master/screenshot-v3.png)