Latest Release
v2.0.0-rc.1
This is a high level overview of what changed between Minerva v1.7.0 and v2.0.0. For old-to-new mappings of every breaking change, read the Migration Guide. For the details of any single component (its full prop list, behavior, and examples), read that component's docs page. Full framework documentation can be found at ua-stratcom.github.io/minerva/
If you need help or run into any problems upgrading Minerva to v2, please reach out to DSC Web Strategy (web@ua.edu) and we'll be happy to help in any way we can
Distribution
- ESM only. The CommonJS build has been dropped.
- The
minerva.phpaggregate file, theminerva-functions.jsbundle of frontend JS classes, and thetokensdirectory of SCSS sources are all new outputs. - Per-component CSS and SCSS are emitted for every component, so you can build a stylesheet containing only what you use.
- The Critical CSS file has been removed. The Baseline CSS file moved into the
cssdirectory. - The package
exportsmap adds./css,./js, and./phpentrypoints, plus a wildcard for reaching anything else in the distribution.
New platforms
Minerva v1 shipped React components and CSS. v2 adds two more implementations of the same component library, all producing the same markup.
- PHP template functions. Every component now has a PHP counterpart: a snake_case
ua_*function that takes an associative array of props and, where the component has content, a second$childrenargument. The whole library is concatenated into a singleminerva.phpfile you canrequire_once. - Standalone frontend JavaScript. Interactive behavior now lives in ES classes (
UA_PrimaryNav,UA_Modal,UA_Tabs, and so on) rather than in React effects, so React, PHP, and plain HTML consumers all get identical interactions.minerva.jsinitializes everything automatically onDOMContentLoaded;minerva-functions.jsexports the classes so SPA-like shells can construct andcleanup()instances by hand. - CSS utility classes have been removed.
Component reorganization
All components now live in a single components directory. In v1 they were spread across components, core, layout, navigation, and utils, and the distribution reflected that split.
PrimaryNavigationis now PrimaryNav, andSecondaryNavigationis now SecondaryNav.Accordion(an alias of Details),CallToActionList,Swatch, and theHeadingutility have been removed.
New components
- Cover: a section container that layers content over a background image and a tinted overlay, with content placement and a color theme inferred from the overlay. It replaces the
backgroundprop removed from Group and more closely matches the WordPress theme's cover block. - Tabs: several panels of related content in one space.
- Eyebrow: short introductory text, usually (but not necessarily) given a heading as its children so the two are wrapped in an
hgroup. - SkipLink: a visually hidden "skip to content" link that appears on focus. Its default target matches the Page component's
skipTargetID, so the two work together with no configuration. - CookieBanner: the standard university cookie notice. It takes no props, reveals itself only when the visitor has not already acknowledged it, and stores consent for 90 days.
- Tag: the single pill from a TagList, exported for the rare case where one is needed outside a list.
Enhancements
Unified link and icon props
Components used to take links and icons apart, as href plus newTab, or iconName plus isBrand. In v2 they take a single prop.
linkaccepts either a URL string or an object of any valid anchor attribute, including acomponentoverride for framework routing.iconaccepts either a FontAwesome icon name or a full set of Icon props (name,type,label,inverse).- A
targetof_blanknow automatically addsrel="noopener noreferrer". - The
finalLinkPropsandfinalIconPropsutilities are exported for use in your own components, withua_resolve_link_propsandua_resolve_icon_propsas the PHP equivalents.
Component improvements
- BrandBar
- Added
official - Added
links
- Added
- Callout can now be used as an alert with the
alertprop. Refer to docs for usage guidelines. - Carousel now supports
className - CodeBlock
langis now optional and defaults to "none" - Details
- Now supports
nameattribute - Added a hover/focus indicator
- Now supports
- Icon has new
inverseprop to swap duotone icon colors - LinkBox
- Added
id
- Added
- Modal has new
buttonprop for custom open button content - Page now accepts a featured image
- PageSearch now supports
className - PrimaryNav now supports dropdowns where the parent is not a link by assigning it an
hrefof# - TagList has a new
labelprop - TitleBar search input can now be controlled with
searchprop - Group
- Added
align,justify, andtextAlignprops - Added
minHeightprop
- Added
The table element no longer has a row hover indicator by default, but this can be brought back by adding the ua_table--hover-guide class to either the table element or the ua_table-wrapper. We've also added a class for striped tables ua_table--striped
Design tokens & theming
The token system was rebuilt from scratch and is now shipped as source in the tokens directory, so you can compile a customized tokens.css.
- Semantic color roles. Components reference a small set of role variables. v1's long list of contextual and element-specific color variables is gone.
- Themes, modes, and color sets. Those role variables are resolved through three layers: a mode (light or dark), a theme (
default,secondary,inverse,bold), and a color set (base,elevated,positive,negative,info,neutral). Changing any layer re-points the semantic variables, so component CSS never has to know which theme it is in. Only use the semantic variables; the reference and set-level variables belong to the color system itself. - Fluid typography. Font sizes are now
clamp()expressions that scale continuously between a minimum and maximum viewport width, replacing v1's breakpoint-stepped sizes. Line heights are a smaller set of unitless values that adapt to the text size. Type is now Inter and Poppins, loaded from Google Fonts rather than Typekit. - Spacing. The numbered
--ua_space--*scale is replaced by named tokens derived from the base line height so vertical rhythm and spacing stay in step. - Renames.
--ua_border-radius--*is now--ua_radius--*,--ua_font--bodyis now--ua_font,--ua_layout-width--*is now--ua_layout--*, and the duotone icon colors moved to--ua_color-duotone--*. Border preset variables were removed. - Zero-specificity scoping. Minerva's styles are scoped with
:where(.ua_minerva)instead of.ua_minerva, so the scope no longer adds specificity and your own selectors override component styles more predictably. The token scope is configurable and defaults to:root.
The layout width classes were replaced by a measure-based system, which also maps onto WordPress's layout model.
ua_measureconstrains a container's children to the reading width, replacingua_layout--standard,ua_layout--wide, andua_layout--full. Explicitua_width--content,ua_width--sidebar,ua_width--wide,ua_width--extra-wide, andua_width--fullclasses handle the cases that need a specific width.ua_stackandua_stack--tightreplaceua_layout--flowandua_layout--flow-half, and now adjust the space before headings automatically.ua_layout--gridis nowua_grid, andua_layout--columnsis nowua_text-columns.ua_justify--*,ua_align--*, andua_text-align--*cover alignment, and are what thejustify,align, andtextAlignprops on components emit.
See the layout documentation for how the pieces fit together, and the color documentation for the theme and color set model.
Class names
Most class names were renamed to follow BEM more closely. The component wrapper is now ua_component rather than ua_component_wrapper, and element names use a double underscore — ua_callout__title, ua_card__content, ua_title-bar__name. Custom CSS targeting Minerva classes needs to be reviewed and retested; the Migration Guide has the full old-to-new table.
Known Issues
This is a list of all known issues in the current release. This content is pulled nightly from our issue tracker on GitHub.
No known issues
There are currently no known issues with the latest release. Please report any bugs you encounter to web@ua.edu.Roadmap
The UA web framework is a living project that evolves with the needs of campus developers and communicators.
Join the Web Forum on Teams to get involved!
Minerva 2.0
This version will focus on a ground up redesign of many underlying systems such as color, layout, spacing, and typography. It will also include PHP component functions and more intuitive prop structure.
Minerva 2.1.0
This update will focus on adding new components to the library