All Projects → adopted-ember-addons → Ember Autoresize

adopted-ember-addons / Ember Autoresize

Licence: mit
Autoresize for Ember Components

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ember Autoresize

Emberx File Input
A tiny Ember component which does one thing and only: select files beautifully.
Stars: ✭ 53 (-41.11%)
Mutual labels:  ember-addon
Ember Styleguide
This is a UI addon that intends to help standardize the Ember family of websites and make it easier to make the Ember website an Ember app.
Stars: ✭ 69 (-23.33%)
Mutual labels:  ember-addon
Ember Drag Sort
A sortable list component with support for multiple and nested lists
Stars: ✭ 82 (-8.89%)
Mutual labels:  ember-addon
Ember Side Menu
Side menu component for Ember.js applications
Stars: ✭ 58 (-35.56%)
Mutual labels:  ember-addon
Nova Advanced Image Field
🌄📐 A Laravel Nova advanced image field with cropping and resizing using Cropper.js and Intervention Image
Stars: ✭ 67 (-25.56%)
Mutual labels:  resize
Ember Cli Coffeescript
Adds precompilation of CoffeeScript files and all the basic generation types to the ember generate command.
Stars: ✭ 72 (-20%)
Mutual labels:  ember-addon
Virtual Each
Ember infinite list component, inspired by react-infinite-list
Stars: ✭ 51 (-43.33%)
Mutual labels:  ember-addon
Ember Cli Stripe
Stripe checkout for Ember
Stars: ✭ 84 (-6.67%)
Mutual labels:  ember-addon
React Native Image Resizer
🗻 Resize local images with React Native
Stars: ✭ 1,161 (+1190%)
Mutual labels:  resize
Ember Cli Sentry
Error tracking via Sentry for Ember.js apps
Stars: ✭ 81 (-10%)
Mutual labels:  ember-addon
Ember Cli Chartist
Ember Addon for Chartist.js
Stars: ✭ 58 (-35.56%)
Mutual labels:  ember-addon
Ember Cli Foundation 6 Sass
Stars: ✭ 65 (-27.78%)
Mutual labels:  ember-addon
Ember Cli Bundle Analyzer
Analyze the size and contents of your Ember app's bundles
Stars: ✭ 78 (-13.33%)
Mutual labels:  ember-addon
React Grid Table
A modular table, based on a CSS grid layout, optimized for customization.
Stars: ✭ 57 (-36.67%)
Mutual labels:  resize
Pynq Dl
Xilinx Deep Learning IP
Stars: ✭ 84 (-6.67%)
Mutual labels:  resize
Ember Simple Auth Auth0
Auth0 + lock.js, built on ember-simple-auth
Stars: ✭ 53 (-41.11%)
Mutual labels:  ember-addon
Ember Cli Clipboard
A simple ember wrapper around clipboard.js
Stars: ✭ 72 (-20%)
Mutual labels:  ember-addon
Ffimageloading
Image loading, caching & transforming library for Xamarin and Windows
Stars: ✭ 1,288 (+1331.11%)
Mutual labels:  resize
Ember Steps
Declaratively create wizards, tabbed UIs, and more
Stars: ✭ 84 (-6.67%)
Mutual labels:  ember-addon
Docker Nginx Image Proxy
on the fly image cropping with gravity, resize and compression microservice
Stars: ✭ 79 (-12.22%)
Mutual labels:  resize

Ember AutoResize Ember Observer Score Code Climate

Greenkeeper badge

Note: if you're using a version of Ember less than 1.12.0, then please use 0.4.1 of this addon.

Ember AutoResize is an Ember-CLI addon for providing autoresize functionality to Ember. This package currently provides the necessary bootstrapping for {{input}} and {{textarea}} components.

To play with the addon, look at our demo. (Note: The demo is a bit out of date, check the documentation below for proper usage.)

Usage

To enable autoresizing on an input, add the following to your handlebars:

{{input autoresize=true}}

Refresh your page, and you should see that when you type in your text field, it automatically resizes to fit the text.

Textareas work exactly the same way:

{{textarea autoresize=true}}

Options

max-width

Set the maximum width of the resizeable element. If no unit is provided, it assumes that it's in pixels.

{{input autoresize=true max-width=200}}

max-height

Set the maximum width of the element. If no unit is provided, it assumes that it's in pixels.

{{input autoresize=true max-height=300}}

rows

Set the minimum number of rows for the element. Recommended for textareas.

{{textarea autoresize=true rows=2}}

max-rows

Set the maximum number of rows for the element. Recommended for textareas.

{{textarea autoresize=true max-rows=10}}

If you are making custom inputs using raw DOM elements, you can still use autoresize by specifying a custom autoresizeElement when you mixin the autoresize to your component.

import Ember from 'ember';

export default Ember.Component.extend({
  autoresizeElementDidChange: on('didInsertElement', function () {
    set(this, 'autoresizeElement', this.$('input')[0]);
  })
});

Installation

ember install ember-autoresize

Roadmap

  • Optimize style lookups
  • Font fitting
  • Clearer ways to enable autoresizing on templates

Contributing

Contributors are welcome! Please provide a reproducible test case. Details will be worked out on a case-per-case basis. Maintainers will get in touch when they can, so delays are possible. For contribution guidelines, see the code of conduct.

Publishing Documentation

To publish documentation (under the tests/dummy directory) run the following command:

npm run-script publish-docs
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].