JumarWeb.ButtonComponents (Jumar v0.1.0)

View Source

You know, those things you click to do just about anything in a web application.

Summary

Functions

Renders a button.

Expand the hit area to at least 44×44px on touch devices.

Functions

button(assigns)

Renders a button.

Examples

<.button>Send!</.button>
<.button phx-click="go" class="ml-2">Send!</.button>
<.button navigate={~p"/"}>Home</.button>

Attributes

  • color (:string) - Defaults to "dark/zinc". Must be one of "amber", "blue", "cyan", "dark", "dark/white", "dark/zinc", "emerald", "fuchsia", "green", "indigo", "light", "lime", "orange", "pink", "purple", "red", "rose", "sky", "teal", "violet", "white", "yellow", or "zinc".
  • outline (:boolean) - Defaults to false.
  • plain (:boolean) - Defaults to false.
  • class (:string) - Defaults to "".
  • Global attributes are accepted. Supports all globals plus: ["href", "navigate", "patch", "method", "name", "value", "disabled"].

Slots

  • inner_block (required)

touch_target(assigns)

Expand the hit area to at least 44×44px on touch devices.

Examples

<.touch_target>Touch me!</.touch_target>

Slots

  • inner_block (required)