Skip to content
Menu

Buttons

Sliding panel button

Sliding panel button: A bordered button whose second label rides in on a colored panel from the right edge, covering the first label completely.

Using Sliding panel button

Sliding panel button uses the inline preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
labeltextDownloadUp to 20 characters
hoverLabeltext12.4 MBUp to 20 characters
accentcolor#FF4D8DNo additional limit in the metadata.
companioncolor#7C5CFFNo additional limit in the metadata.
durationnumber300From 120 to 900; step 20
Which frameworks are available for Sliding panel button?

Sliding panel button is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Sliding panel button depend on?

The React metadata lists these npm dependencies beyond React: motion, clsx.

What accessibility details are visible in Sliding panel button?

The React source for Sliding panel button includes: attributes and handlers (aria-hidden). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Sliding panel button handle reduced motion?

Sliding panel button reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: dur: reduced ? 0 : Math.max(duration, 0) / 1000; duration: reduced ? 0 : 0.08. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components