button (v1) (deprecated)
Three variations of buttons are available in JourneyApps:
- 1.Regular buttons
- 2.Menu buttons - which is a
buttonplaced inside a
- 3.Primary button - which is fixed to the bottom of the view and spans its full width.
Buttons can be used to trigger functions:
- 2.Calling link functions directly - by specifying
Buttons should be used when you need a user to perform a specific action on your view. They should be worded clearly so that users know what will happen when they click it. In general, a view shouldn't contain too many buttons, otherwise they start to compete with one another and overwhelm the user. If you find yourself using buttons everywhere, you may need to determine whether your view has too many actions on it, or whether a
listwould work better instead.
Buttons are appropriate for actions such as "create", "add", "new", "edit", "update", "complete", "save", "proceed", "log in", etc.
<button label="Press Me" on-press="sayHello" />
<button label="Search for Item" subtext="Search through items by name" icon="icons/search-icon.png" on-press="sayHello" />
A special case of the Regular Button is also available. This button is displayed on the bottom of the screen and spans the entire width (excluding sidebar). Use this button when your page has one main call-to-action. These buttons work well for actions like "Done" / "Complete" / "Log in" / "Proceed".
A button can be made into a Primary button by adding
type="primary"to its tag:
<button type="primary" label="I Have Started Work" on-press="started()" />
The following apply only to
buttoninside a menu component).
menucomponent can be used to render buttons in a menu. However, the recommended way of creating menus is now using the