We have two ways to create buttons:
<button type="button">Standard Button</button>
<button type="submit">Submit Form</button>
<a href="https://piedpiper.retool.com/apps/pp-admin/{{ contact.id }}" class="button">Admin panel</a>
Use the anchor tag when your "button" needs to link to another page. Otherwise, stick with the <button>
element.
Buttons can have different states to indicate their current status:
<button class="button" disabled>Can't click me</button>
You can add classes to indicate specific visual treatment. We currently support ghost
, warning
and danger
both in light and dark mode.
To add copy functionality to any element, simply add the data-copy
attribute with the value you want to copy. When clicked, the text will be automatically copied to the user's clipboard.
<button data-copy="{{ api.key }}">Copy</button>
Use clear, action-oriented text (e.g., "Save Changes" instead of "OK")
Use color and contrast to make important buttons stand out using the ghost
, warning
and danger
classes
Maintain adequate spacing between buttons to prevent accidental clicks