A client-side mechanism to crop images.
Name | Type | Default | Description |
---|---|---|---|
src | String | N/A | The path of the image to crop. |
rounded | Boolean | true | If the crop mask should be a circle. Defaults to true. |
system_arguments | Hash | N/A | System arguments |
loading
A loading indicator that is shown while the image is loading.
Name | Type | Default | Description |
---|---|---|---|
system_arguments | Hash | N/A | System arguments |
<%= render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC)) %>
<%= render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: false)) %>
<%= render(Primer::Alpha::ImageCrop.new(src: Primer::ExampleImage::BASE64_SRC, rounded: false)) do |cropper| %><% cropper.with_loading(style: "width: 120px").with_content("Loading...") %><% end %>