Skip to content

Button Component

The button-v1 component provides a customizable button with multiple visual variants.

<button-v1 variant="primary">Click Me</button-v1>

The primary button style, used for main actions:

<button-v1 variant="primary">Primary Button</button-v1>

Secondary button style for less prominent actions:

<button-v1 variant="secondary">Secondary Button</button-v1>

A text-only button without a background:

<button-v1 variant="text">Text Button</button-v1>
AttributeTypeDefaultDescription
variant'primary' | 'secondary' | 'text''primary'Button style variant
disabledbooleanfalseWhether the button is disabled

The button component emits standard button events:

const button = document.querySelector('button-v1');
button.addEventListener('click', (e) => {
console.log('Button clicked!');
});
<button-v1 variant="primary" disabled>Disabled Button</button-v1>
<button-v1 variant="primary">
<icon-v1 name="check"></icon-v1>
Save Changes
</button-v1>

The button component respects your theme’s accent color and can be customized using CSS custom properties.