PineUiPhoenix.Types (Pine UI v0.1.3)

View Source

Type specifications for Pine UI components.

This module contains type specifications used throughout the library to provide better documentation and IDE support.

Summary

Types

Component default assigns.

Badge component assigns.

Button component assigns.

Card component assigns.

Select component assigns.

Text input component assigns.

Types

assigns()

@type assigns() :: Phoenix.LiveView.Socket.assigns()

Component default assigns.

Common assigns accepted by most components:

  • :class - Additional CSS classes
  • :id - DOM element ID
  • :phx_* - Phoenix LiveView specific attributes

badge_assigns()

@type badge_assigns() :: assigns()

Badge component assigns.

Additional assigns:

  • :variant - Color variant (success, warning, etc.)

button_assigns()

@type button_assigns() :: assigns()

Button component assigns.

Additional assigns:

  • :loading - Boolean to show loading state
  • :disabled - Boolean to disable the button
  • :icon - Optional icon markup

card_assigns()

@type card_assigns() :: assigns()

Card component assigns.

Additional assigns:

  • :title - Optional card title
  • :subtitle - Optional card subtitle
  • :footer - Optional footer content
  • :padded - Boolean to add padding to content area

select_assigns()

@type select_assigns() :: assigns()

Select component assigns.

Additional assigns:

  • :options - List of {value, label} tuples
  • :selected - Currently selected value
  • :placeholder - Placeholder text

text_input_assigns()

@type text_input_assigns() :: assigns()

Text input component assigns.

Additional assigns:

  • :label - Optional input label
  • :value - Current input value
  • :placeholder - Placeholder text
  • :required - Boolean for required input
  • :disabled - Boolean to disable the input
  • :hint - Optional help text
  • :error - Optional error message