A versatile button component matching the CodeSignal Design System.
Import the CSS file in your HTML or CSS:
<link rel="stylesheet" href="/design-system/components/button/button.css">or
@import url('/design-system/components/button/button.css');.button: The base class required for all buttons.
.button-primary: Primary action button (Brand Blue)..button-secondary: Secondary action button (Outlined)..button-tertiary: Tertiary/Ghost button (Subtle background)..button-danger: Destructive action button (Red)..button-success: Positive action button (Green)..button-text: Default Text button (Neutral text, no background)..button-text-primary: Primary Text button (Brand color text, no background).
.button-xsmall: Extra small size (32px height)..button-small: Small size (40px height)..button-large: Large size (60px height).- Default size is Medium (48px height) if no size class is provided.
The component supports standard pseudo-classes (:hover, :focus, :active, :disabled) and utility classes for manual state application:
.hover.focus.active.disabled
<!-- Primary Button -->
<button class="button button-primary">Click Me</button>
<!-- Secondary Small Button -->
<button class="button button-secondary button-small">Cancel</button>
<!-- Disabled Danger Button -->
<button class="button button-danger" disabled>Delete</button>
<!-- Text Button -->
<button class="button button-text">Read More</button>This component relies on variables from:
design-system/colors/colors.cssdesign-system/spacing/spacing.cssdesign-system/typography/typography.css