Phases.Umbraco.CharacterCounter
1.0.3
dotnet add package Phases.Umbraco.CharacterCounter --version 1.0.3
NuGet\Install-Package Phases.Umbraco.CharacterCounter -Version 1.0.3
<PackageReference Include="Phases.Umbraco.CharacterCounter" Version="1.0.3" />
<PackageVersion Include="Phases.Umbraco.CharacterCounter" Version="1.0.3" />
<PackageReference Include="Phases.Umbraco.CharacterCounter" />
paket add Phases.Umbraco.CharacterCounter --version 1.0.3
#r "nuget: Phases.Umbraco.CharacterCounter, 1.0.3"
#:package Phases.Umbraco.CharacterCounter@1.0.3
#addin nuget:?package=Phases.Umbraco.CharacterCounter&version=1.0.3
#tool nuget:?package=Phases.Umbraco.CharacterCounter&version=1.0.3
Phases.Umbraco.CharacterCounter
A custom Umbraco property editor — Character Counter Textbox — that works like the built-in Textbox, with a live character count under the field (for example 42 / 160).
Typing past the soft limit is allowed. The counter turns orange when you are within 10 characters of the limit, and red when the limit is exceeded.
Compatible with Umbraco 17 and Umbraco 18.
Install
dotnet add package Phases.Umbraco.CharacterCounter
Or in your .csproj:
<PackageReference Include="Phases.Umbraco.CharacterCounter" Version="1.0.3" />
Restart the site after install, then hard-refresh the backoffice (Ctrl+F5).
Requirements
| Umbraco | >= 17.0.0 and < 19.0.0 |
| .NET | net10.0 (same as Umbraco 17/18) |
How to use
- In the backoffice go to Settings → Data Types → Create.
- Select the property editor Character Counter Textbox (group: common).
- Configure the Data Type (see below), then save.
- Add that Data Type to a Document Type property.
Stored value type: plain string (Umbraco.Plain.String).
Configuration
| Setting | Description | Default |
|---|---|---|
| Maximum characters | Soft limit shown in the counter. Typing past this is allowed. | 160 |
| Placeholder text | Optional placeholder when the field is empty. | (none) |
| Multi-line | Use a textarea instead of a single-line input. | false |
Features
- Live
{current} / {max}counter while typing - Warning color near the limit; danger color when over
- Does not block input past the maximum
- Single-line (
uui-input) or multi-line (uui-textarea) - Read-only support in the backoffice
Links
- GitHub repository
- Umbraco Marketplace (search for Phases.Umbraco.CharacterCounter after listing)
- Report issues
For contributors (source repo)
This repository contains:
| Project | Role |
|---|---|
Umbraco.CharacterCounter.Package |
NuGet / RCL package (Phases.Umbraco.CharacterCounter) |
Umbraco.CharacterCounter |
Sample Umbraco site for local testing |
# Build the Lit UI
cd Umbraco.CharacterCounter.Package/client
npm install --legacy-peer-deps
npm run build
# Pack
dotnet pack Umbraco.CharacterCounter.Package/Umbraco.CharacterCounter.Package.csproj -c Release -o artifacts
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Umbraco.Cms.Core (>= 17.0.0 && < 19.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.