defmodule PyrauiWeb.DocsLive.ThemeConfigDocs do use PyrauiWeb, :html def render(assigns) do ~H"""
Theme Config

Theme Configuration

Configurable theme system with color, spacing, and font tokens. Use the `Pyraui.Theme` module to orchestrate consistent styling programmatically across your product.

Color Tokens

Curated palette engineered for luminous contrast on dark surfaces.

<%= for {name, value} <- @colors do %>
{name}
{value} Token
<% end %>
    
    # Get a color token
    Pyraui.Theme.color(:primary)
    # => "oklch(70% 0.213 47.604)"

    # Get all colors
    Pyraui.Theme.colors()
    
            

Spacing Tokens

Modular scale spacing mapped to responsive rhythm.

<%= for {name, value} <- @spacing do %>
{name}
{value}
<% end %>
    
    # Get a spacing token
    Pyraui.Theme.spacing(:md)
    # => "1rem"

    # Get all spacing tokens
    Pyraui.Theme.spacing_tokens()
    
            

Font Tokens

Typography stacks that deliver clarity across platforms.

<%= for {name, families} <- @fonts do %>
{name}
The quick brown fox jumps over the lazy dog
Stack {Enum.join(families, ", ")}
<% end %>
    
    # Get a font token
    Pyraui.Theme.font(:sans)
    # => ["ui-sans-serif", "system-ui", "sans-serif"]

    # Get all fonts
    Pyraui.Theme.fonts()
    
            

Theme Functions

Leverage helper functions to access tokens inside LiveViews, components, and modules.

Function Description
Pyraui.Theme.color/1 Get a color token value
Pyraui.Theme.spacing/1 Get a spacing token value
Pyraui.Theme.font/1 Get a font token value
Pyraui.Theme.current_theme/1 Get current theme from assigns
""" end end