An alternative button React component/Scrivito widget for the Scrivito CMS.
Open your terminal.
$ cd
to your Scrivito project
$ npm install scrivito-adv-button
Import the widget in your javascript (e.g. in index.js
or Widgets/index.js
).
Add this line to your index.js:
import "scrivito-adv-button";
Also add the styling of the widget to your app. This can be done by either loading it via css-loader
(e.g. in index.js
or Widgets/index.js
):
import "scrivito-adv-button/index.css";
Or by including the styling to your style sheets (e.g. in index.scss
):
@import "~scrivito-adv-button/index.css";
The Scrivito Advanced Button Widget renders a button, with optional rounded borders and the option to set an anchor for the link. Works best in conjunction with our Headchor Widget, where you can store an anchor ID. The Headchor Widget is part of this package and is accessible in your Scrivito App automatically after you've installed this package.
In the widget properties you can set:
- Link target - must start with a #, if the target is an anchor on the same page.
- Alignment
- Background color
- Rounded corners