Skip to content
Ringobook v3.27.0

Close Button

The close button is a ghost icon button used to dismiss elements like alerts, dialogs, or popovers.

Use a small ghost icon .ro-btn with an aria-label for accessibility.

<button class="ro-btn ro-variant-ghost ro-shape-icon ro-size-sm" aria-label="Close">
<i class="ro-icon ro-icon-x-small"></i>
</button>
Preview

On dark or colored backgrounds, use .ro-color-scheme-inverted so hover and focus states remain visible.

<button class="ro-btn ro-variant-ghost ro-color-scheme-inverted ro-shape-icon ro-size-sm" aria-label="Close">
<i class="ro-icon ro-icon-x-small"></i>
</button>
Preview

Place the close button in an actions area, such as .ro-alert-actions or .ro-toast-header-actions.

<div class="ro-alert ro-color-scheme-danger">
<i class="ro-alert-icon ro-icon ro-icon-info-circle"></i>
<div class="ro-alert-content">
<div class="ro-alert-header">
<p class="ro-alert-title">Error alert</p>
<div class="ro-alert-actions">
<button class="ro-btn ro-variant-ghost ro-color-scheme-inverted ro-shape-icon ro-size-sm" aria-label="Close">
<i class="ro-icon ro-icon-x-small"></i>
</button>
</div>
</div>
<p class="ro-alert-body">Something went wrong.</p>
</div>
</div>
Preview

Error alert

Something went wrong.

ClassDescription
.ro-variant-ghostTransparent background with hover state.
.ro-shape-iconSquare icon-only button.
.ro-size-smCompact size for inline dismiss actions.
.ro-color-scheme-invertedLight foreground for use on dark or accent backgrounds.
ClassDescription
.ro-overlay-closeAbsolute overlay dismiss control (40×40). Used in popovers and modals.
.ro-popover-closeClose control positioned in a popover header.
.ro-btn.ro-toast-closeToast dismiss button. See Toasts.

Changelog

Recent updates in @ringover/styles. See the full package changelog .

@ringover/styles@3.7.0
  • Alerts now use a small ghost inverted button instead of `.ro-close`.