Component API

<reveal-button>

Open live example

Button that reveals hidden slotted content when clicked. Set size="sm"
for a compact button one step below the default, matching ui-button's
sm size.

Install

import "@f-ewald/components/reveal-button.js";

Usage

<reveal-button label="Show the secret">
  Surprise! This content was hidden.
</reveal-button>

Attributes / properties

PropertyAttributeTypeDefaultDescription
labellabelstring"Reveal hidden content"Label shown on the button before it's clicked.
disableddisabledbooleanfalseDisables revealing the slotted content.
sizesize"sm" | "md""md"Size — sm reduces the button's height/padding/font-size one step below the default.

Events

None.

Slots

SlotDescription
(default)Content to reveal when clicked.

CSS custom properties

Custom property
--ui-border-width
--ui-button-background
--ui-button-background-active
--ui-button-background-hover
--ui-button-border
--ui-button-highlight
--ui-button-text-shadow
--ui-focus-ring
--ui-font
--ui-font-size-sm
--ui-font-size-xs
--ui-font-weight-medium
--ui-line-height-tight
--ui-on-accent
--ui-primary
--ui-primary-hover
--ui-radius-sm