@bolt/components-image

2.10.1 • Public • Published

An image. Part of the Bolt “Components” CSS framework that powers the Bolt Design System.

Install via NPM
npm install @bolt/components-image

Image sizes

IMPORTANT: This method of adding classes to images is DEPRECATED.

To specify image size (e.g u-bolt-width-1/1) pass the correct class like so:

{% set classes = create_attribute(imageAttributes | default({})).addClass([
    "c-bolt-image__img",
    "u-bolt-width-1/1",
  ])
%}

Then pass it into the component:

{% include '@bolt-components-image/image.twig' with {
  src: "/images/placeholders/tout-4x3-climber.jpg",
  alt: "A Rock Climber",
  imageAttributes: classes,
} only %}

Dependencies (3)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @bolt/components-image

    Weekly Downloads

    10

    Version

    2.10.1

    License

    MIT

    Unpacked Size

    197 kB

    Total Files

    20

    Last publish

    Collaborators

    • mikemai2awesome
    • evanlovely
    • remydenton
    • dmorse
    • colbycook