directus-extension-interface-percentage
v1.2.0
Published
Edit normalized 0..1 values as percentages in Directus.
Maintainers
Readme
Directus Percentage Interface
A minimal Directus interface extension that stores normalized numeric values as 0..1 and edits them in Studio as 0..100%.
Behavior
- UI range:
0to100 - Stored range:
0to1 - Conversion:
stored = ui / 100 - Empty input emits
null - Configurable UI step
- Default UI step:
1
Recommended field type
Use a Decimal field when you want exact storage.
Examples:
- UI step
1=> stored increment0.01=> typical scale2 - UI step
0.1=> stored increment0.001=> typical scale3
Float also works, but Decimal is the better fit for normalized percentage data.
Installation
npm install
npm run build
