Shadix.Components.Button (shadix v0.0.1)

Copy Markdown View Source

A button styled with the shadcn variant/size system.

Renders a <button> carrying data-slot="button" plus data-variant and data-size for stable styling/targeting. Caller-supplied class is appended last; Tailwind cascade layers ensure it wins over the defaults.

Summary

Functions

button(assigns)

Attributes

  • variant (:string) - Defaults to "default". Must be one of "default", "secondary", "destructive", "outline", "ghost", or "link".
  • size (:string) - Defaults to "default". Must be one of "default", "sm", "lg", or "icon".
  • type (:string) - Defaults to "button".
  • class (:string) - Defaults to nil.
  • Global attributes are accepted. Supports all globals plus: ["disabled", "form", "name", "value", "autofocus"].

Slots

  • inner_block (required)