Skip to content

Color & Background

The text-bg-* helpers set a theme background together with a readable, contrasting text colour in one class. Use them for badges, tiles, banners and status labels when you want the pairing to stay accessible in every colour scheme.

1Every theme colour as a badge

One text-bg-* class sets the background and a contrasting text colour together.

primarysecondarysuccessdangerwarninginfolightdark

2Coloured cards

text-bg-* on a card colours the whole card and keeps the copy readable.

Wine pairing

We listen first, then build a plan around what you actually need.

Wine pairing

Start in minutes and get help from a real person whenever you need it.

Cooking classes

Clear prices, honest advice and no surprises along the way.

3Announcement banner

A full-width strip with text-bg-warning for a time-limited message.

Heads up: scheduled maintenance on Jan 12, 2027 at 12:15. Details

4Status labels in a table

Invoice states shown with text-bg-* badges in a table cell.

InvoiceClientAmountStatus
#PO-3466Omar Fischer$889.74Paid
#TX-9872Tariq Sato$525.55Pending
#PO-9560Chloe Whitaker$360.93Overdue
#TX-1046Samir Brennan$772.90Draft

5Counters on avatars

Small text-bg-danger pills show unread counts on profile pictures.

Liam Carter10 unread messages
Owen Ibrahim14 unread messages
Felix Delgado4 unread messages

6Pricing header

A dark header band with text-bg-dark above a light pricing body.

Team

$94.15
  • Local ingredients
  • Online reservations

7Calendar day chips

Today in text-bg-primary, a booked day in text-bg-info and free days in text-bg-light.

Oct12
Oct13
Oct14
Oct15
Oct16
Oct17
Oct18

8Checkout steps

Numbered step circles coloured by state: done, current and upcoming.

  1. Cart
  2. Address
  3. 3Payment
  4. 4Review

9Coloured toast

A toast-style message using text-bg-success for the whole box.

Your changes to private events were saved.

10KPI tiles

Dashboard tiles where each metric gets its own theme background.

13.5k
Customers
9.6k
Revenue
8.4k
Waiting
39.7k
Reviews

11Tinted backgrounds

text-bg-* respects --bs-bg-opacity, so one class gives lighter tints of the same colour. Put text on the full colour, labels beside the light tints.

100%
75%
50%
25%
10%

12Profile header

A cover band with text-bg-primary behind a profile name and actions.

Kenji Lindqvist

Kenji Lindqvist

Art Director · Edinburgh

13Keyboard shortcut legend

text-bg-dark and text-bg-light make neat key caps in a help panel.

Ctrl + K
Open search
Esc
Close dialog
?
Show shortcuts

14Sale ribbon on a product

A text-bg-danger label positioned over a product image.

Lemon tiramisu -33%

Lemon tiramisu

$10.00

15Footer strip

A compact text-bg-dark footer with links that inherit the light text.

16Activity timeline dots

Coloured icon dots make each activity type easy to spot.

  • The small habits that make a big differenceyesterday
  • How we make our sourdough every morningjust now
  • Our favourite tips for busy weeksjust now
  • How to choose the right dishjust now

17Kanban card priorities

Priority labels in text-bg-* on small task cards.

High
A beginner's guide to getting started
Medium
Planning the perfect birthday dinner
Low
Five wines to pair with a summer dinner

18Chat bubbles

Incoming messages in text-bg-light, your own messages in text-bg-primary.

Friendly people answer your questions quickly, by phone, chat or email.
Cooking classes on Saturday mornings teach you our favourite recipes.
We have been feeding this neighbourhood for over a decade, and we still love it.
Our team has done this many times, so you never have to guess.

19List group highlights

text-bg-* on individual list items to flag the selected and the problem rows.

  • Wine pairing
  • Private events (selected)
  • Wine pairing
  • Dine-in (failed)

20Code chip

Inline file names and commands on a text-bg-dark chip inside running text.

Run npm run build and upload the dist folder to your server.