Detent web components
By Shane Logsdon

Buttons & actions

Neon Edge Button

Implemented

Precise travelling edge light button

detent-neon-edge-button

Port status
Catalog status
implemented
Origin
upstream
Phase
2
Wave
phase-2-controls
Group
Buttons & actions
Deploy preview

2.7 KB gzip for the class module

Variants

default (speed 1) Publish release
speed 2 / 0.5 Fast sweep Slow sweep
slot fallback
glow opt-out
disabled Unavailable Fast, disabled

Recorded states

  • focus-visible recorded state; no setter
  • disabled recorded state; no setter
  • reduced motion recorded state; no setter

Usage

Import

import '/components/neon-edge-button/define.js';

// or register it yourself
import { DetentNeonEdgeButton } from '/components/neon-edge-button/neon-edge-button.js';

Attributes

  • disabled
  • glow
  • speed

Properties

No properties are recorded for this component.

Slots

  • default

Events

No events are recorded for this component.

Example

Runnable example: site/examples/neon-edge-button.ts. The snippet below is generated from the catalogued attributes.

<detent-neon-edge-button
  disabled
  glow
  speed="1"
></detent-neon-edge-button>

Source

The pinned upstream source for this row:

  • src/components/ui/NeonEdgeButton.tsx sha256 276e9a8b2677…

Native files

The native module and its artifacts:

  • src/components/neon-edge-button/neon-edge-button.ts
  • src/components/neon-edge-button/styles.css
  • src/components/neon-edge-button/define.ts
  • docs/components/neon-edge-button.md
  • site/examples/neon-edge-button.ts
  • tests/browser/neon-edge-button.spec.ts
  • evidence/components/neon-edge-button.md

API

Boolean attributes follow HTML presence semantics: present means true, absent means false, and disabled="false" still means disabled.

Attributes

Attributes
AttributePropertyTypeDefaultNotes
disabled———Recorded in the catalog as an attribute.
glowglowbooleantruePresence semantics: present means true, absent means false.
speedspeednumber1Kebab-case attribute; camelCase property.

Properties

No property-only values are recorded for this component.

Events

No custom events are recorded for this component.

Slots

Slots
SlotNotes
defaultConsumer content; rendered through a slot, never re-created.

CSS customisation

  • React `children`/`ReactNode` props become DOM slots; caller content stays light DOM.
  • `lucide-react` icon components replaced with local SVG assets (ISC notice retained).
  • React state/hooks replaced by element-owned state with pre-upgrade property preservation.
  • Upstream's #050505/#FAFAFA/white-beam dark-only palette is replaced by theme tokens (--detent-color-surface-raised, --detent-color-text, a color-mix beam highlight), so the control is legible in light and dark (PC-9.5).
  • `children` becomes the default slot and the recorded default 'Deploy preview' becomes its fallback text (PC-11.1/11.2).
  • `speed` publishes --detent-neon-duration (3 / speed seconds) instead of an inline animation string; behaviour is identical.
  • The upstream Tailwind focus-ring utility becomes a 2px --detent-color-accent outline (PC-9.2/9.7).
  • The travelling light is one rotating transform on the beam element (CSS only), not a per-instance inline style block.

What it does

A primary action whose light source travels around a 1px perimeter ring while the label stays the most readable thing on the control. One real <button>, one CSS animation, no framework.

Upstream behaviour
  • Travelling light follows the button perimeter instead of animating border color
  • Neutral glow keeps the effect aligned with EasyUI surfaces
  • Still reads as a polished button when motion is disabled
Differences from upstream
  • React `children`/`ReactNode` props become DOM slots; caller content stays light DOM.
  • `lucide-react` icon components replaced with local SVG assets (ISC notice retained).
  • React state/hooks replaced by element-owned state with pre-upgrade property preservation.
  • Upstream's #050505/#FAFAFA/white-beam dark-only palette is replaced by theme tokens (--detent-color-surface-raised, --detent-color-text, a color-mix beam highlight), so the control is legible in light and dark (PC-9.5).
  • `children` becomes the default slot and the recorded default 'Deploy preview' becomes its fallback text (PC-11.1/11.2).
  • `speed` publishes --detent-neon-duration (3 / speed seconds) instead of an inline animation string; behaviour is identical.
  • The upstream Tailwind focus-ring utility becomes a 2px --detent-color-accent outline (PC-9.2/9.7).
  • The travelling light is one rotating transform on the beam element (CSS only), not a per-instance inline style block.
Previous: Shape Loader Next: Hanging Charm

Docs

Components

Project