View Source Phoenix.UI.Components.Button (Phoenix UI v0.1.9)
Provides button component.
Link to this section Summary
Functions
Renders button component.
Link to this section Functions
@spec button(Phoenix.LiveView.Socket.assigns()) :: Phoenix.LiveView.Rendered.t()
Renders button component.
examples
Examples
<.button>
Click me
</.button>
attributes
Attributes
class(:string) - Override the classes applied to the component.color(:string) - The color of the component. Defaults to"blue".element(:string) - The HTML element to use, such asdiv. Defaults to"button".extend_class(:string) - Extend existing classes applied to the component.full_width(:boolean) - If true, the component will take up the full width of its container.size(:string) - The size of the component. Defaults to"md".square(:boolean) - If true, rounded corners are disabled. Defaults tofalse.variant(:string) - The variant to use. Defaults to"contained".- Global attributes are accepted. Arbitrary HTML or phx attributes. Supports all globals plus:
["csrf_token", "disabled", "download", "form", "href", "hreflang", "method", "name", "navigate", "patch", "referrerpolicy", "rel", "replace", "target", "type", "value"].
slots
Slots
inner_block(required)