Skip to content

pantoken / renderers/web-components/src / button

Változó: button

const button: ElementDefinition

Alfa

<instui-button> — egy token-stílusú <button>. A variant attribútum a -color-<variant> módosítóhoz kötődik (secondary, tertiary, success, danger, ai, …); a margin szóközt ad hozzá a host körül (InstUI kulcsszavak, mint small / medium large); a slot tartalma a cimke.

Ez egy natív invoker is: popovertarget (opcionális popovertargetaction értékkel) váltogat bármilyen light-DOM [popover]-t, mint <instui-context-view>, <instui-popover>, vagy <instui-tray>, és command/commandfor vezérli a parancs alapú komponenseket (<instui-modal> --show/--close értékekkel, stb.). Az id az invoker IDL-en keresztül továbbítódik a belső gombhoz, így a shadow határon keresztül feloldódik, és egy később a dokumentumban deklarált elemre mutathat előre.

Példa

html
<instui-button variant="primary" margin="small">Save changes</instui-button>
<instui-button variant="danger" margin="small">Delete</instui-button>
<instui-button popovertarget="cv">Details</instui-button>
<instui-context-view id="cv">More about this item.</instui-context-view>
Save changesDeleteDetailsMore about this item.