Skip to content

Buttons

The screen Content → Nova → Component styles → Buttons sets the buttons of the whole shop. The core’s button classes read these values, and the buttons of Nova’s builders are based on them. The screen works as described on How a component screen works.

The group Settings (“every button in the shop”) holds Loader after a click:

OptionEffect
All buttonsEvery button that opens another page of the shop or sends its form so a page loads shows the loader. This is Nova’s value.
Listed onlyOnly “Go to checkout”, “Display shopping cart” and “Back to shop” in the checkout.
NoneNo button shows the loader.

“The button shows the loader in place of its text until the next page comes. […] Buttons that open a window, a menu or send a form in the background never take it.”

The group Variants lists the variants with the classes they apply to. Each has the states Normal, Hover and Pressed.

ElementClassNova’s valueWhere the shop uses it
Primary button.btn-primaryWhite text on the primary colour; black text where the primary colour is light.cart and checkout (“Checkout”, “Place order”), account, cookie bar, CMS forms, reviews, 404 page
Secondary button.btn-secondaryWhite text on the skin’s secondary colour; black text where that colour is light.closing the off-canvas panel, “Close” in the address window
Outline button.btn-outline-primaryText and border in the primary colour, no background; hovered, it fills.“Back to shop” in the checkout, filter panel, address windows
Secondary outline button.btn-outline-secondaryText and border in the secondary colour; hovered, it fills.“Add product”, “Add promo code”, remove item, address tabs; the variants on the product page take only its colours
Light button.btn-lightThe text colour on the second background.“Details” on the card, “Change address”, profile, order history; the wishlist button and the gallery’s zoom take only its colours
Subtle button.p2lab-nova-btn-subtleA thin frame in the border colour, text in the text colour; hovered, the frame darkens; pressed, a muted background.Nova’s listing toolbar: “Filters”, the sorting, the view and density buttons
Link button.btn-linkNo background, no border; hovered, it is underlined.“View cart”, “Change shipping”, account menu, footer, cookie groups
Buy button.btn-buyEverything from the primary button until it is overridden.“Add to shopping cart” on the product card and on the product page

For a product that cannot be bought, the buy button is shown grey, as in the core. A link inside a text (.btn-link-inline) belongs to the screen Links.

The group Shared holds what the variants have in common:

ElementClassNote
Button baseevery variant“The base stands under every variant: a variant overrides only what it changes. Colours belong to the variants; the corners read the token of Variables › Radii and shadows.”
Small buttons.btn-smChanges only spacing, type size and corners; the colours stay with the variant. State Normal only.
Large buttons.btn-lg · .btn-buyAs the small size. The core renders the buy button in the large size. State Normal only.
Icon buttonssocial icons, the ”×” of a popup, the wishlist heartThe shape and size of buttons that are only an icon; the colours stay with each place.

An icon button has a touch target of the control height M (44 px, Content → Nova → Variables → Grid and spacing) around it, however small its circle, and the button itself is never smaller than 24 px.

The core keeps its own look for .btn-outline-light (the quantity buttons), .btn-dark, .btn-outline-dark and .btn-outline-danger.

Preview: every variant in every state shows each variant in the states Normal, Hover and Pressed with the contrast of its text. Where every variant reaches 4.5:1 in every state, the checks read “Every variant has a contrast of at least 4.5:1 in every state.”