0.0.9 • Published 2 years ago
@triptyk/tpk-ember-textarea v0.0.9
tpk-ember-textarea
This addon will give you a simple textarea alternative in TailwindCSS
Compatibility
- Ember.js v3.20 or above
- Ember CLI v3.20 or above
- Node.js v12 or above
- You need tailwind v2 or above to use this simple textarea
Installation
ember install @triptyk/tpk-ember-textarea
OR
pnpm add -D @triptyk/tpk-ember-textarea
Usage
Features
- Limit of characters
- Add class error trigger when @hasError is true and you can add a yield with the error
- A info tooltip under the textarea with @infoTooltip
Integration example
Template .hbs
<Ui::Textarea
@label="Add your favorite JS framework"
@value={{this.value}}
@containerStyle=""
@labelStyle=""
@textareaStyle=""
@col=""
@row=""
@limitStyle=""
@tooltipStyle=""
@mandatory={{true}}
@infoTooltip="A good info"
@hasError={{true}}
@updateValue={{this.setValue}}
@value={{this.value}}
@placeholder="Write a value"
@key="text"
type="nothing | text | date | string | password"
{{on "focus" this.focusOtherTextarea}}
/>
Controller .ts/.js
@tracked value = '';
@action
setValue(value: string | number) {
this.value = value;
}
Contributing
See the Contributing guide for details. You can also contact info@triptyk for more informations on how contributing on this project.
License
This project is licensed under the MIT License.