One contract: Button

Loom Base 1.0.0, MIT
Purpose
Starts an action in the current view: save, publish, open a dialog, run a check.
When not to use it
  • Going to another page or URL: use Link.
  • Choosing one of several options: use RadioGroup or Select.
States
idle (PRESS); flags: disabled, busy
Keyboard and role
Enter, Space, Tab ยท role button, the same on native
Tested behaviour
13 scenarios, run on web and native from this one file
Three of its 36 tokens, resolved from the component to the value
Component tokenResolves throughValue
root.background@tone=primarysemanticcolor.action.primary.backgroundprimitivecolor.palette.greige.900#17140f
root.color@tone=primarysemanticcolor.action.primary.textprimitivecolor.palette.greige.0#fbf8f1
root.min-heightsemanticsize.control.mdprimitivesize.scale.4040px
Read from packages/base/contracts/button.contract.json and the token files when this page is built, so it always matches the code.