Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ddwht/sketch-dynamic-button
Dynamic button plugin for Sketch.app
https://github.com/ddwht/sketch-dynamic-button
Last synced: about 1 month ago
JSON representation
Dynamic button plugin for Sketch.app
- Host: GitHub
- URL: https://github.com/ddwht/sketch-dynamic-button
- Owner: ddwht
- Created: 2014-03-04T18:42:44.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2016-08-28T01:18:16.000Z (over 8 years ago)
- Last Synced: 2024-01-25T07:09:28.171Z (11 months ago)
- Size: 200 KB
- Stars: 1,055
- Watchers: 53
- Forks: 57
- Open Issues: 34
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-sketch - ddwht/sketch-dynamic-button - in for Sketch.app allows to create buttons with fixed margins no matter what text you add." (Uncategorized / Uncategorized)
- awesome-sketch - Dynamic Button
- sketch-goodies - Dynamic Button - Create buttons with fixed paddings no matter what text you add. (Uncategorized / Uncategorized)
README
# Dynamic button plugin for Sketch.app
Dynamic button plug-in for [Sketch.app](http://bohemiancoding.com/sketch/) allows to create buttons with fixed paddings no matter what text you add.
## Update
[SOON] Version 2.0
- [add] Some new attractive features
Version 1.2:- [add] Supports Sketch 3.2
- [add] Now you can select multiple layers to convert them to buttons / update them at onceVersion 1.1:
- [add] Support Sketch >= 3.0.2
- [add] Now you can use CSS shorthands (10:10, 10:10:10, 10:10:10:10)
- [add] Feedback messages ('nothing selected', 'wrong format')Thanks [IngoValente](https://github.com/IngoValente) for CSS shorthands and all other users for appreciation.
## Demo
[![Demo Video](https://dl.dropboxusercontent.com/u/1909742/sketch-plugin/thumb.png)](http://www.youtube.com/watch?v=ZJCYUCU7YxQ)
## Installation
1. [Download Dynamyc button.sketchplugin.](https://github.com/sketchplugins/sketch-dynamic-button/archive/master.zip)
2. Double-click the file inside download folder. Sketch should open automatically and tell you that a new plugin was installed.
3. You should see the Dynamic button entry under the Plugins menu.
## How-to
You can firstly create a structure (like on the image bellow) manually and then use plug-in. Or create text layer and then make a structure automatically using shortcut `Cmd + J`. After you can see a group "flexible button" with text layer (0:0:0:0) and background ('BG').0:0:0:0 are padings. The syntax is like CSS paddings.
*For e.g.
padding: 10px 20px 10px 20px (padding: top right bottom left)
10:20:10:20 (top:right:bottom:left)*Make the paddings you need (in text layer name), select text layer and press `Cmd + J`.
That's it! You create your dynamic button. Now you can change text and press `Cmd + J`. Button will change automatically.
## Changing the Default Keyboard Shortcut
1. Open Sketch's plugins folder. You can do it by choosing
custom script from the Plugins menu, then click the gear icon and
choose "Open Plugins Folder".
2. Open the file "Dynamic Button.sketchplugin" in text
editor.
3. The shortcut is on the first line:```
// just a comment (cmd j)
```
Change it.
[Scripting documentation](http://bohemiancoding.com/sketch/scripting/)[Twitter](https://twitter.com/dwht)
[Facebook](https://www.facebook.com/alexander.kudymov)