Component Variables
Define variables at the component level to expose a customisation API without changing implementation.
Define variables at the component level to expose a customisation API without changing implementation.
.card {
--card-bg: #fff; --card-border: #dee2e6; --card-pad: 1.25rem;
background: var(--card-bg); border: 1px solid var(--card-border); padding: var(--card-pad);
}
.card.dark { --card-bg: #2d2d2d; --card-border: #444; }
Component variables create an API: callers override variables, not internal CSS.