Option card

Option card component pack for Seed

Install

npm install seed-option-card --save

Dependencies


Example

.c-option-card provides a wrapper for a traditional input radio or checkbox.

Pick One:
<div class="c-option-card">
  <label class="c-option-card__label">
    <input type="radio" class="c-option-card__selector" name="example" />
    <div class="c-card">
      <div class="c-card__block">
        ...
      </div>
    </div>
  </label>
</div>

Control Group

Pick One:
<div class="o-control-group">
  <div class="c-option-card">
  ...
  </div>
  <div class="c-option-card">
  ...
  </div>
  <div class="c-option-card">
  ...
  </div>
</div>

Configurations

Below are the default Sass configuration variables for seed-option-card. The variables can be found in the pack’s _config.scss file.

seed-option-card/_config.scss
// Namespaces
$seed-option-card-namespace: c-option-card !default;
$seed-option-card-label-namespace: #{$seed-option-card-namespace}__label !default;
$seed-option-card-selector-namespace: #{$seed-option-card-namespace}__selector !default;

// Config
$seed-option-card-background-color-active: rgba(black, 0.025) !default;
$seed-option-card-border-color: #ddd !default;
$seed-option-card-border-hover-color: #ccc !default;
$seed-option-card-border-focus-color: #3197D6 !default;
$seed-option-card-box-shadow-focus: 0 0 0 2px rgba($seed-option-card-border-focus-color, 0.2) !default;
$seed-option-card-border-size-focus: 2px !default;