Tactical Button
Install the component, then paste your configured usage. Your settings are included in the code below.
npx arclen-ui add tactical-button --settings eyJ2YXJpYW50Ijoib3JpZ2luYWwiLCJsYWJlbCI6IkJ1dHRvbiIsImRpc2FibGVkIjpmYWxzZSwiYW5pbWF0ZSI6dHJ1ZSwidGV4dENvbG9yIjoiI2Y0ZjRmNCIsImJhY2tncm91bmRDb2xvciI6IiMyMDIwMjAiLCJjb3JuZXJDb2xvciI6IiNhYWFhYWEiLCJyZXZlYWxDb2xvciI6IiNlZjZiMzUiLCJmb250U2l6ZSI6MTYsInBhZGRpbmdYIjoyNCwicGFkZGluZ1kiOjEyLCJsZXR0ZXJTcGFjaW5nIjowLCJjb3JuZXJTaXplIjo4LCJjb3JuZXJXZWlnaHQiOjEsImNvcm5lclRyYXZlbCI6NCwiY29ybmVyRHVyYXRpb24iOjYwMCwiY29ybmVyU3RhZ2dlciI6MTAwLCJzY2F0dGVyQ29sb3IiOiIjZjRmNGY0Iiwic2NyYW1ibGVJbnRlcnZhbCI6MTAwLCJjbGFzc2ljSW5zZXQiOjQsImNsYXNzaWNCbHVyIjoxLCJsYWJlbFNjYWxlIjowLjk1LCJzY2FuRHVyYXRpb24iOjQyMCwic2Nhbk9wYWNpdHkiOjAuMTIsInNodXR0ZXJEdXJhdGlvbiI6MSwic2h1dHRlckRhbXBpbmciOjMyLCJwcmVzc0RlcHRoIjoxLCJzY3JhbWJsZSI6dHJ1ZX0import { TacticalButton } from "@/components/tactical-button";
export default function Example() {
return <TacticalButton {...{
"variant": "original",
"label": "Button",
"disabled": false,
"animate": true,
"textColor": "#f4f4f4",
"backgroundColor": "#202020",
"cornerColor": "#aaaaaa",
"revealColor": "#ef6b35",
"fontSize": 16,
"paddingX": 24,
"paddingY": 12,
"letterSpacing": 0,
"cornerSize": 8,
"cornerWeight": 1,
"cornerTravel": 4,
"cornerDuration": 600,
"cornerStagger": 100,
"scatterColor": "#f4f4f4",
"scrambleInterval": 100,
"classicInset": 4,
"classicBlur": 1,
"labelScale": 0.95,
"scanDuration": 420,
"scanOpacity": 0.12,
"shutterDuration": 1,
"shutterDamping": 32,
"pressDepth": 1,
"scramble": true
}} />;
}| Property | Type | Default |
|---|---|---|
variantVariant Choose a motion style; use a preset to apply its complete palette and tuning. Options: original (Classic), scan (Scan), shutter (Shutter) | select | "original" |
labelLabel Visible label and accessible button name, up to 40 characters. Up to 40 characters | text | "Button" |
disabledDisabled Blocks activation and cancels decorative motion. | boolean | false |
animateAnimate Enable hover and press effects. Reduced-motion preferences always take priority. | boolean | true |
textColorText color Resting letter colour. | color | "#edeef0" |
backgroundColorBackground color Button fill and Shutter panel colour. | color | "#18191b" |
cornerColorCorner color Bracket colour and Scan sweep accent. | color | "#5a6169" |
revealColorReveal text Letter colour uncovered by the Shutter panels. | color | "#ef6b35" |
fontSizeFont size Desktop font size in pixels; compact screens use 87.5% of this size. 12–24Step 1 | number | 16 |
paddingXHorizontal padding Space on each side of the label in pixels. 8–48Step 1 | number | 24 |
paddingYVertical padding Space above and below the label. The native target remains at least 44 pixels high. 4–24Step 1 | number | 12 |
letterSpacingLetter spacing Tracking in em units; label and decorative copies stay aligned. -0.02–0.2Step 0.01 | number | 0 |
cornerSizeBracket size Length of each corner arm in pixels. 4–16Step 1 | number | 8 |
cornerWeightBracket weight Stroke weight in pixels. 1–3Step 0.5 | number | 1 |
cornerTravelBracket travel Outward diagonal travel in pixels. Zero keeps the brackets still. 0–12Step 0.5 | number | 4 |
cornerDurationBracket timing Travel duration in milliseconds; stagger is independent. 200–1200Step 20 | number | 600 |
cornerStaggerBracket stagger Milliseconds between corners, preserving the Classic corner order. 0–250Step 10 | number | 100 |
scatterColorScatter colour Letter colour while scattering. When the text resolves, its normal or Shutter reveal colour returns. | color | "#edeef0" |
scrambleIntervalCharacter interval Milliseconds per resolved character. The first character resolves at 60% of this interval. 30–180Step 10 | number | 100 |
classicInsetFill inset How far the Classic fill retreats on hover, in pixels. 0–10Step 0.5 | number | 4 |
classicBlurFill blur Classic fill blur on hover, in pixels. 0–6Step 0.5 | number | 1 |
labelScaleLabel scale Classic label scale on hover. One keeps its original size. 0.85–1Step 0.01 | number | 0.95 |
scanDurationSweep timing Duration of the single directional sweep in milliseconds. 180–1000Step 20 | number | 420 |
scanOpacitySweep opacity Brightness of the moving orange band. Accent letters remain visible. 0–0.5Step 0.01 | number | 0.12 |
shutterDurationShutter timing Time multiplier for the panel spring. Higher values move more slowly. 0.5–2Step 0.1 | number | 1 |
shutterDampingShutter damping Higher values give a softer, more restrained settle. 24–44Step 1 | number | 32 |
pressDepthPress depth Scan label travel and fill compression; Shutter fill dimming. Zero removes decorative press feedback. 0–3Step 0.25 | number | 1 |
scrambleScatter text Use Classic’s character scramble on pointer entry. Turning this off keeps the label readable throughout. | boolean | true |
Tactical Button
One free button, three motion styles. **Classic** is the default: scattering text, staggered brackets and a gently receding fill. **Scan** adds an orange sweep across graphite. **Shutter** parts two graphite panels to uncover orange letters. All three use Classic’s scattering text and bracket order.
Choose a preset
The tweaks panel includes six complete starting points:
- **Classic:** the original graphite treatment and timing. - **Scan:** graphite, ivory lettering, orange brackets and a directional sweep. - **Shutter:** graphite panels with an orange text reveal. - **Compact scan:** smaller spacing, shorter bracket travel and faster text and sweep timing. - **Soft shutter:** slower panels, stronger damping and gentler press feedback. - **Quiet classic:** no scattering or blur, with restrained bracket travel.
Presets replace the full configuration. The Variant control changes only the motion style and preserves your custom colours and tuning. Reset restores Classic and all manifest defaults. The API retains variant="original" for Classic compatibility.
import { TacticalButton } from './components/tactical-button';
<TacticalButton
variant="scan"
label="Replay reveal"
textColor="#eeeae1"
backgroundColor="#18191b"
cornerColor="#de4912"
fontSize={16}
paddingX={24}
scanDuration={420}
scrambleInterval={100}
scatterColor="#de4912"
onAction={() => replay()}
/><TacticalButton
variant="shutter"
label="Show project"
textColor="#eeeae1"
cornerColor="#de4912"
revealColor="#ef6b35"
shutterDuration={1.5}
shutterDamping={38}
pressDepth={0.5}
onAction={() => showProject()}
/>Shape and colour
Layout controls adjust font size, horizontal and vertical padding, and letter spacing. Compact screens use 87.5% of the font-size setting. The button follows its label, wraps within its container and retains a minimum 44px target. Bracket size and weight affect only the corner marks. Text, fill and bracket colours are independent; Scan also uses the bracket colour for its sweep and accent lettering. Shutter’s Reveal text colour appears as the panels uncover each letter.
Motion controls
Bracket travel, timing and stagger apply to every style. Travel can be zero. Stagger preserves the Classic corner order: top left, bottom left, bottom right, top right. Turning Scatter text off preserves the full label. Scatter colour sets the active lettering independently from Text color. All masked copies use it while scattering, then restore their ordinary text or Shutter reveal colour. This control is disabled when Scatter text is off. Character interval sets the time per resolved character; the first resolves at 60% of that interval. Every masked text layer receives the same scramble sample.
Classic exposes fill inset, fill blur and label scale. Its bracket timing also sets the fill and label duration. Scan exposes sweep timing and opacity. Shutter timing is a multiplier for its spring: larger values move more slowly. Higher damping softens its settling motion. Press depth controls Scan’s label travel and compression, or Shutter’s fill dimming. Controls for another style are hidden, and Character interval is disabled while Scatter text is off.
Vanilla and HTML
import { mount } from './components/tactical-button/src/core';
const controller = mount(host, { variant: 'scan', label: 'Replay reveal', textColor: '#eeeae1', cornerColor: '#de4912' });
const button = host.querySelector('[data-tb-trigger]');
button?.addEventListener('click', handleReplay);
controller.update({ scanDuration: 600, cornerTravel: 6 });
controller.pause();
controller.resume();
// When removing the component:
button?.removeEventListener('click', handleReplay);
controller.destroy();The configured React install and HTML download include your selected settings. HTML uses the same core and local assets. The generated API reference lists all bounds, defaults and property names.
Interaction and accessibility
onAction receives one native MouseEvent for click, Enter, Space or touch activation. It never navigates or submits a form on its own. The accessible name always remains the complete label; decorative text copies are hidden from assistive technology. Keyboard focus is visible. Hover decoration runs only for hover-capable fine pointers.
Updates, including variant changes, preserve the native button, focus, consumer listeners and any outer transform owned by a parent animation. Pause, hidden-document and offscreen states stop decoration and restore the complete label. Resume waits for fresh pointer entry. Disabled blocks activation. Reduced motion and Animate off keep the readable idle state; functionality remains available.
Server HTML is readable before JavaScript. Missing motion APIs use a static fallback. The included OFL Geist Mono font falls back to system monospace. There are no external runtime dependencies or remote assets.
The preview runs the component’s own JavaScript. It respects reduced motion and pauses when off screen. The HTML bundle includes a static fallback.
Every setting in this panel comes from the component manifest. Preview size, pause and replay stay in the inspector.