Skip to content
W WRNexusJS
feedback component

PreviewBadge

Reusable preview badge component.

@wrnexus/ui 0.2.673 props1 slots0 events

Usage

Components are auto-discovered. Use the component directly in any .wrn view:

<PreviewBadge
  label="Preview"
  variant="default"
/>

Legacy mount name: data-component="PreviewBadge".

Props and attributes

PropTypeRequirementDefault
labelstringOptional"Preview"
variantstringOptional"default"
classstringOptional""

Slots

  • default

Events

This component does not declare a custom event.

Source contract

Installed source: components/PreviewBadge.wrn

component PreviewBadge {
  props {
    label = "Preview"
    variant = "default"
    class = ""
  }
  view {
        <span class="wire-badge wire-badge--{variant} wire-catalog-badge wire-catalog-badge--previewbadge {class}">{label}<slot />
        </span>
    }
}