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.
| Control | Type | Default | Preview limits |
|---|---|---|---|
label | text | Download | Up to 20 characters |
hoverLabel | text | 12.4 MB | Up to 20 characters |
accent | color | #FF4D8D | No additional limit in the metadata. |
companion | color | #7C5CFF | No additional limit in the metadata. |
duration | number | 300 | From 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.