frame

ButtonMachineOutline

The quiet cousin of `ButtonMachine`: the same dashed frame with no block behind the label. On hover the frame and the label take the current accent. Pass `href` and it renders a link.

Install

pnpm add @fractaldesign/machines-ui
import '@fractaldesign/machines-ui/style.css';
import { ButtonMachineOutline } from '@fractaldesign/machines-ui';

Preview

<ButtonMachineOutline onclick={() => console.log('open')}>Open</ButtonMachineOutline>
<ButtonMachineOutline href="/docs/examples">Examples</ButtonMachineOutline>
<ButtonMachineOutline disabled>Button</ButtonMachineOutline>

Props

PropTypeDefaultDescription
href string —Makes it a link: an `<a>` with this address instead of a `<button>`.
type 'button' | 'submit' | 'reset' 'button'The `type` of the `<button>`. Not used when `href` is set. Default 'button'.
disabled boolean falseDisables the `<button>`. Not used when `href` is set. Default false.
onclick (event: MouseEvent) => void —Called when the button or link is clicked.
class string ''Extra classes on the outer element.

API

  • snippet children The label.
  • class forwarded to the outer element

src/lib/components/frame/ButtonMachineOutline.svelte

machines-ui