Component API

<reveal-button>

Open live example

Button that reveals hidden slotted content when clicked.

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.

Events

None.

Slots

SlotDescription
(default)Content to reveal when clicked.

CSS custom properties

Custom property
--ui-focus-ring
--ui-font
--ui-font-size-sm
--ui-font-weight-medium
--ui-line-height-tight
--ui-on-accent
--ui-primary
--ui-primary-hover
--ui-radius-sm