Search code examples
symbolsoverridingsketch-3

Method for Adaptive Cards with Variable Height Text in Sketch


Has anyone managed to pin down a method for creating cards in Sketch which will play well with adaptive height text overrides? For example, a simple card with a thumbnail, title and excerpt might have a title which is 1, 2 or 3 lines and an excerpt which is anything between 6 and 12+ lines. I'd like to know how to position the excerpt relative to the new height of the title but it seems not to interpret the new three-line height, only it's original height in the symbol. See attached for illustration.

enter image description here

Methods that I've tried include pinning the excerpt to the bottom but that doesn't play well with the variable length of the excerpt and grouping the title and the thumbnail. The only working method that I have is creating three instances of the symbol called post-title-one-line, post-title-two-line, post-title-three-line – which seems clunky.

Looking for any ideas or direction to a solution.


Solution

  • My recommendation is to use the Auto-Layout by Anima plugin. Follow the documentation and examples provided to learn how to use it. Here's an example solution:

    Screenshot of Sketch File

    Example Sketch File