Do & Don't
Show the right way and the wrong way side by side, for design guidelines.
Do and Dont are panels for design guidelines: what to do, and what to
avoid. Each has a coloured top edge and a label in words, with a tick or a
cross, so it reads without colour vision. Inside goes anything: text, an image
or a live component. Set a pair side by side with Columns.
Do
Stable Beta
Use one word that names the state.
Don't
This is ready to use now
Write a sentence in a badge. It wraps, and nobody reads it.
Do
Write a shortcut as the keys a reader presses: Ctrl K.
Don't
Write a shortcut as code, like Ctrl+K, which reads as something to type.
Usage
Leave blank lines around the content so mdsvex reads the markdown inside.
The labels default to “Do” and “Don’t”. Pass label for other words, such as label="Avoid" or the words of a site in another language.
Colours
The panels use two theme tokens, --docsmith-do and --docsmith-dont. By
default they are a green and your theme’s --destructive, each mixed a little
toward the text colour so the label stays readable in both colour modes. Set
either in your stylesheet to change it:
API reference
Do
label string default 'Do'children required Snippet Dont
label string default "Don't"children required Snippet