Text Crop is a plugin that removes the whitespace around text boxes. No longer will you have extra leading above and below your text. Layout designs in the way you intended.
This plugin creates a component, which dynamically resizes to ensure text is the right size. You can use any styles you want in the component, just hit 'Crop'.
This plugin is available for installation here
A full guide on how to use this plugin in your design files has kindly been written by James Newson and the NewsKit Design Team
- Install dependencies with
npm i. - Run
npm run devand a folder nameddistwill be created. - In the Figma desktop app, click on Create new plugin / Link existing plugin and point it to the
manifest.jsonin this project. - Now you can edit the main Figma code from
src/code.tsand the UI code fromsrc/ui.vue. Hitting save will auto-reload the build so you can see your changes right away.
