SupabaseSurface.Components.Button (supabase_surface v0.1.5)
A html button with predefined sizes, types and optional link
functionality.
Properties
- html_type :string, values: ["submit", "button", "reset"], default: "button" - The html type of the button, e.g. 'submit', 'button' or 'reset'.
- aria_label :string, required: false - The aria label for the button.
- size :string, values: ["tiny", "small", "medium", "large", "xlarge"], default: "tiny" - The size of the button.
- type :string, values: ["primary", "default", "secondary", "outline", "dashed", "link", "text"], default: "primary" - The button type.
- block :boolean, default: false - Use the full width.
- label :string - The label for the generated
<button>
element, if no content (default slot) is provided. . - to :string - The page to link to.
- method :atom, default: :post - The method to use when used as a link.
- id :string - Id to apply to the button.
- class :css_class - Class or classes to apply to the button.
- opts :keyword, default: [] - Additional attributes to add onto the generated element.
- disabled :boolean, default: false - If the button should be disabled.
Slots
- default - The content of the generated
<button>
element.
Events
- capture_click - Triggered when the component captures click.
- click - Triggered when the component receives click.
- window_focus - Triggered when the page receives focus.
- window_blur - Triggered when the page loses focus.
- focus - Triggered when the component receives focus.
- blur - Triggered when the component loses focus.
- window_keyup - Triggered when a key on the keyboard is released (window-level).
- window_keydown - Triggered when a key on the keyboard is pressed (window-level).
- keyup - Triggered when a key on the keyboard is released.
- keydown - Triggered when a key on the keyboard is pressed.
Link to this section Summary
Functions
Callback implementation for Phoenix.LiveComponent.mount/1
.
Link to this section Functions
Link to this function
mount(socket)
Callback implementation for Phoenix.LiveComponent.mount/1
.