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.
Settings: Loader after a click
Section titled “Settings: Loader after a click”The group Settings (“every button in the shop”) holds Loader after a click:
| Option | Effect |
|---|---|
| All buttons | Every 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 only | Only “Go to checkout”, “Display shopping cart” and “Back to shop” in the checkout. |
| None | No 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.”
Variants
Section titled “Variants”The group Variants lists the variants with the classes they apply to. Each has the states Normal, Hover and Pressed.
| Element | Class | Nova’s value | Where the shop uses it |
|---|---|---|---|
| Primary button | .btn-primary | White 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-secondary | White 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-primary | Text 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-secondary | Text 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-light | The 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-subtle | A 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-link | No background, no border; hovered, it is underlined. | “View cart”, “Change shipping”, account menu, footer, cookie groups |
| Buy button | .btn-buy | Everything 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.
Shared
Section titled “Shared”The group Shared holds what the variants have in common:
| Element | Class | Note |
|---|---|---|
| Button base | every 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-sm | Changes only spacing, type size and corners; the colours stay with the variant. State Normal only. |
| Large buttons | .btn-lg · .btn-buy | As the small size. The core renders the buy button in the large size. State Normal only. |
| Icon buttons | social icons, the ”×” of a popup, the wishlist heart | The 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
Section titled “Preview”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.”