Components Actions
Button
A button, in a variant and a size.
$ pyblade ui:add button
Variants
Sizes
With an icon
Put a <pb-i:...> icon before or after the text; size icon makes a square button.
Disabled
Props
Written as attributes of <pb-ui.button>; put a colon before one to pass it a Python value, as in :items="items". A slot is written <pb-slot:name>.
| Name | Type | Default | Description |
|---|---|---|---|
| variant | str | "primary" | primary, secondary, neutral, outline, ghost, link, error |
| size | str | "md" | sm, md, lg, or icon for a square button |
| type | str | "button" | button, submit or reset |
| class | str | "" | Added to the classes of the component. Every other attribute is spread on it too. |