Button
buttons trigger an action or a change. one primary action per view; everything else is secondary, ghost or text so the hierarchy stays calm.
Usage
Buttons trigger an action or a change of state. Give each view a single primary action,
the one thing you most want the user to do, and express every other action as secondary,
ghost or text so the hierarchy stays calm.
Anatomy
The host .lucent-button carries the variant and size. The real <button> inside is
.lucent-button__inner; an optional prefix icon sits before .lucent-button__label. With an
href, the host itself is an <a> and the inner element is a span.
<span class="lucent-button lucent-button--primary lucent-button--md">
<button class="lucent-button__inner" type="button">
<span class="lucent-icon lucent-icon--sm" aria-hidden="true">
<span class="material-icons lucent-icon__glyph">check</span>
</span>
<span class="lucent-button__label">Save as default</span>
</button>
</span><lucent-button> <lucent-icon lucentPrefix name="check" size="sm" /> Save as default </lucent-button>
Variants
Six levels of emphasis. text is the quietest, on-glass sits on a glass surface, and
danger is reserved for destructive intent.
Sizes
Density follows the shared --control-height-* scale, so buttons line up with inputs, selects
and every other control at the same size.
Loading and disabled
loading swaps the label for a spinner and disables interaction; disabled dims the button
and removes pointer events.
Playground
Do & Don't
Keep one primary action per view; pair it with a ghost or secondary for the alternative.
Stack multiple primary buttons; it flattens the hierarchy and adds noise.
Lead the label with a verb: "Save changes", "Delete project".
Fall back to vague labels like "OK" or "Submit" when a specific verb reads clearer.
Use `loading` for async actions so the button disables itself while the request runs.
Leave a button active during a pending request; it invites double submits.
Using it
API
Slots
Theming
Button reads the control-density scale plus the accent and surface roles. Override --color--semantic--accent-default to recolour every primary button, or the --control-height-* tokens to change density, with no markup changes.