stacked row of mixed primary/outline buttons from items.

Live preview

Install

From your site folder, run:

jprot add ButtonGroup

That downloads the self-contained component into theme/components/ButtonGroup.js,

where it is picked up automatically — the same way as any built-in component.

To remove it later, just delete that file.

Use it as a homepage section

Add an entry to the sections: list in jprot.config.js:

sections: [
  { component: 'ButtonGroup', title: 'ButtonGroup' },
]

Use it inside a page

On its own line in any Markdown file, passing the props:

:::ButtonGroup items='[{"label":"Primary","url":"/a","kind":"p"},{"label":"Secondary","url":"/b","kind":"s"},{"label":"Tertiary","url":"/c","kind":"t"}]'

Props

PropTypeNote
itemsarray[{ label, url, kind }] kind: p\s\t

↩ Back to all elements