Button

Displays a button.

Button Size

Use the size prop to change the size of the button.

Default

Outline

Secondary

Ghost

Destructive

Link

Icon

With Icon

Rounded

Spinner

Button Group

Link

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::button::*;

#[component]
pub fn ButtonAnatomy() -> impl IntoView {
    view! { <Button /> }
}

API Reference

Button

Creates a button.

Custom Attributes
NameTypeDefaultDescription
button_typeString"submit"

Renamed <button> `type` attribute to avoid name collisions.

invalidboolfalse

Toggle whether or not the input is disabled.

sizeString""

Specify the size to render the button.

variantString"primary"

Specify the style of button to render.

Implements global and button attributes.