fractalsvelte mascot fractalsvelte fractalsvelte

Svelte 5 component · machines-ui · 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

ButtonMachineOutline is a Svelte 5 ASCII button machine outline component in @fractaldesign/machines-ui. It works in SvelteKit and in any Svelte 5 app.

pnpm add @fractaldesign/machines-ui

Import

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

Usage

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

Props

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

Snippets

NameTypeDefault
default unknown —