PureAdmin.Config (PureAdmin v1.1.0)

Copy Markdown View Source

Application-level configuration for PureAdmin.

Set in config/config.exs:

config :keen_pure_admin,
  app_name: "My App",
  app_logo: "/images/logo.svg",
  app_version: "1.0.0",
  copyright: "© 2026 My Company",
  font_class: "pa-font-responsive",
  default_variant: "primary",
  toast_position: "top-right"

Components like navbar_brand/1 and footer/1 read from this config automatically when no explicit content is provided.

Available Keys

KeyDefaultUsed by
:app_name"PureAdmin"navbar_brand/1
:app_logonilnavbar_brand/1
:app_versionnilfooter/1
:copyrightnilfooter/1
:font_classnilroot_html_attrs/0
:default_variant"primary"various components
:toast_position"top-right"toast_container/1

Summary

Functions

Get the full merged config as a map.

Get the app logo URL.

Get the app name.

Get the app version.

Get the copyright text.

Get the default component variant.

Get the font class for the <html> element (e.g. "pa-font-responsive").

Get a single config value with fallback to default.

Returns HTML attributes for the <html> element.

Functions

all()

@spec all() :: map()

Get the full merged config as a map.

app_logo()

@spec app_logo() :: String.t() | nil

Get the app logo URL.

app_name()

@spec app_name() :: String.t()

Get the app name.

app_version()

@spec app_version() :: String.t() | nil

Get the app version.

copyright()

@spec copyright() :: String.t() | nil

Get the copyright text.

default_variant()

@spec default_variant() :: String.t()

Get the default component variant.

font_class()

@spec font_class() :: String.t() | nil

Get the font class for the <html> element (e.g. "pa-font-responsive").

get(key, default \\ nil)

@spec get(atom(), any()) :: any()

Get a single config value with fallback to default.

root_html_attrs()

@spec root_html_attrs() :: map()

Returns HTML attributes for the <html> element.

Includes the font_class if configured. Use in your root layout:

<html lang="en" {PureAdmin.Config.root_html_attrs()}>