View Source PineUi.Types (Pine UI v0.1.2)

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

@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
@type badge_assigns() :: assigns()

Badge component assigns.

Additional assigns:

  • :variant - Color variant (success, warning, etc.)
@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
@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
@type select_assigns() :: assigns()

Select component assigns.

Additional assigns:

  • :options - List of {value, label} tuples
  • :selected - Currently selected value
  • :placeholder - Placeholder text
@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