Does the typography component have any significant overhead over the text component ?
It feels like a good solution for using everywhere I use text. Setting up typography presets for everything like all header sizes, etc and dark and light variants. But concerned that may have a huge overhead without digging too deep and testing. As It’s only really been demoed as an article.
I did hear rumblings of “presets” which is probably the final solution.
There’s no real difference between text and typography in terms of performance or overhead because they use the same technology under the hood. However, there’s a big difference in how they’re used.
Text - Simple text wrapped in a single wrapper tag, h1, p, div etc Typography - Multiple blocks (h1, p, div) wrapped in an article tag with prose applied.
So it really depends on what the requirements are. Text is great for simple strings like text inside a button. Typography is great for mixing headers with paragraphs while maintaining a consistent style via the theme settings.
Presets is a little different, it’ll allow you to choose between a number of different sets of default values. Hope that makes sense?
Yes, think I’ll wait for presets to keep things consistent.
My thoughts were simply that, consistency when coming back to a design maybe days later, and adding a Header 1 for example. Without copy pasting another header 1 or inspecting it, my memory of how I set the other header 1’s up isn’t that good.
There’s always globals of course (but seems overkill to have one for every different header etc).
Typography kind of works but feels wrong to use a different instance for every header and every text.
Yep, sounds like presets will be a great fit for this. We’re also working on templates that will allow you to save several configured components as a single item, then drag it onto the page.