- Captivate User Guide
- Introduction to Captivate
- Add a slide
- Design options in Adobe Captivate
- Add text blocks
- Add media blocks
- Interactive components
- Add branding blocks
- Widgets
- Create quizzes
- Add audio to a project
- Interactions
- Animations
- Accessibility
- Customize the timeline
- Customize TOC and Playbar
- Edit project properties
- Create a simulation project
- Preview a project
- Share a project for review
- Publish a project
- Upgrade projects in Adobe Captivate
Learn about how to modify a custom design option in Adobe Captivate.
Overview
This article contains steps to modify a custom design option using CSS styles along with some examples. As a prerequisite, learn about how to create a custom design option and understand the parts of a design option file.
Topics in this page:
Understand the design option structure
Containers: These are outer most container that houses multiple components, such as titles, subtitles, body text, cards, and images. Customizing an outer container, such as a card that encloses other components, will also impact the style and appearance of the components inside it.
Item tags: These tags identify each component within a container. To modify the styles for each container, you must first understand the tagging convention within a container and how each slide or content block is structured. This will help you navigate to the correct sections in the design options file, using the tags in the text editor to change the styling properties.
Download
Here is an example of an image content block and its components along with its corresponding tags. Using these tags, you can locate the sections in the design option JSON file and add your CSS styles or modify the CSS properties.
Key name | Values | Description | Required |
“tag” | String | Every container and slide item will have a unique identifier known as tag. It is used to apply preset / customStyles/ appearanceProps on corresponding containers or slide item. | Yes |
"preset" | String | Only valid for text blocks. Name of the preset that needs to be applied to element | No |
"designOptionId" | String | Name of the design option to apply to an element. Note that this is applicable only for elements which are child nodes or for one of the UICs like Button. | No |
"customStyles" | Object Example: "customStyles": { "all": { /* All CSS properties. */ /* E.g., "flexDirection": "rowReverse" */ }, "desktop": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ } , "tablet": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ } , "mobile": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ }, "mobile_landscape": { /* All CSS properties. */ /* Properties to be applied in addition to listed in all section */ }, } |
Used to apply CSS style directly on the element or the container. Note that the CSS style name needs to be in camel case. E.g., flex-direction would become flexDirection. No CSS Selectors are allowed. The styles mentioned here are going to be applied directly as CSS styles to the corresponding HTML element These are not mapped to the Visual properties of the respective container. Because of this very nature, some properties, like “margin” could be out of sync with the Visual properties, like “content-width”. As a guideline, if something can be controlled via Visual properties, declare these properties under “customProperties” and the rest under “customStyles” as CSS properties. |
No |
“customProperties” | Object Refer to customProperties table for further details. |
The entries that are present in Visual properties. These are going to be mapped to the respective container's visual properties. For e.g. in the example on to the left, the “fill” property can be used to change the container’s color. Also, “customProperties” may have different values for different content blocks. For example, a button container could have a property by name “no-of-buttons”, which allows one to control the number of buttons to be shown in the container. | No |
Key Name | Subproperties | Description |
"appearanceProps" | "appearanceProps" are generic to both card and content blocks. Add this property in design option JSON file if you want to add fill, border, shadow on the container. | |
“cornerRadius | Card container property only "cornerRadius": { "type": 1, "value": { "topLeft": 4, "bottomLeft": 4, "bottomRight": 4, "topRight": 4 } }, |
|
“fill” | To add a background to a container, use the fill property. The fill property includes the following information:
Solid Fill JSON Structure "fill": { Image Fill JSON Structure "fill": { Linear/Radial Gradient JSON Structure
"fill": { "type": <Fill Type (use 3 for Linear Gradient or 4 for Radial Gradient)>, By using the fill property and its associated attributes, you can define various background styles for containers. |
|
“shadow” | Shadows can be added to container elements, such as content blocks or card containers, using the shadow property. The following attributes define the shadow's appearance: Shadow Properties
Shadow on content block container The following properties are used to apply a shadow to the container:
Example: "shadow": { "x": 1, "y": 2, "blur": 4, "color": "#b3b3b3", "type": 1, "alpha": 0.5, "enabled": false } Shadow on Card Container The following properties are used to add a shadow to the card container:
Example: "shadow": { "x": 0, "y": 0, "blur": 10, "color": "#666666", "enabled": true }
|
|
“border” | Borders can be applied to container elements, such as content blocks or cards, using the border property. The following attributes define the border's appearance: Border Properties:
Example: "border": { "enabled": false, "color": "cp-color-c4", "width": 8, "type": 0 } Border Properties for Card Container
Example: "border": { "enabled": true, "color": "#666666", "width": 5, "type": 1 }
|
|
“components” | Changing Component Alignment
Controlling Card Visibility
Example: The card container holds components or slide items, and you can customize their alignment and visibility using the components property. Changing Component Alignment
Controlling Card Visibility
Example "components": { |
|
“cardPadding” | The card container property allows you to add padding to the card container. It accepts values in pixels, and the padding is applied to all sides of the container | |
“alignmentAndSpacing” | “padding” | You can define padding for any object, card container, or content block using the padding property within the alignmentAndSpacing section. Padding Properties
Example: "alignmentAndSpacing": { "padding": { "left": 10, "right": 10, "top": 50, "bottom": 50, "isDTMLinked": false, "tablet": { "top": 80 }, "mobile": { "top": 80 } } }
|
“autofit” | Autofit – applicable only for content blocks. This will automatically fit in available space Example: "alignmentAndSpacing": { "autoFit": false, "padding": { "left": 10, .... } }, |
|
"textProps" | Applicable only to text blocks. Example: "customProperties":{ "textProps": { "listProps":{ "listDepth":4, "listColor": "#EB2699", "listSize":"120%", "listType":"OrderedListRoman1" } } } |
|
"imageHeight" "imageAspectRatio" "imageBehavior" |
Applies only to image content block and image grid content block. If "imageBehavior" is set to "IG_SCALE", we honor "imageAspectRatio" to scale the object in different viewports. But if it is set to "IG_FIXED_HEIGHT" , we honor "imageHeight" property. Example: { "customProperties": { "alignmentAndSpacing": { ..... "imageHeight": 768, "imageAspectRatio": 3.415, "imageBehavior": "IG_SCALE" } |
|
"videoHeight" | Applies to only video card container. This defines the height of the video object in the content block. Example: {"tag": "videoCard", "customStyles": { ... }, "customProperties": {.... "videoHeight": 400 } }
|
|
"imageHeight" "minImageHeight" | Applies to only character and scenario content blocks.
{ "tag": "character-block-container", "customStyles": { ...... "customProperties": { "imageHeight": 600, "minImageHeight": 200 } }
|
|
"position" | Applies only to question slides' Caption objects. Position defines the position of the captions in the question slide:
Example: { "tag": "slide-item-question-caption", "customProperties": { "position": 1 }, }
|
-
From Installed location, copy \content_blocks\Image\Single Image Default Design Option to the custom folder in eLearning Assets and name the folder appropriately. In this example the new name is Custom Single Image design.
-
Open this folder using any text editor and update the values of name and description fields in localized.json file.
{ "en-US": { "name": "Custom Test 123", "description": "Custom design option For Single Image" }, "fr-FR": {} }
-
Add a unique name to the designOptionID and set "isDefault" to false.
{ "type": "image", "name": "$$name", "description": "$$description", "version": "1.0", "isDefault": false, "designOptionId": "Custom test 123",
-
Locate the tag: "container-image-card"
-
Set the container flow to grid.
"tag": "container-image-card", "customStyles": { "all": { "display": "grid", "gridTemplateColumns": "1fr 1fr", "gap": "50px" },
-
Now to position the components in the grid for image content block, locate the tag : "slide-item-image" and place the image container to the left in the grid. Note that any styling to image container is provided under custom styles of image object with key “imageContainerStyles”.
"tag": "slide-item-image", "customStyles": { "all": { "imageContainerStyles": { "minWidth": "100%", "maxWidth": "100%", "gridArea": "1 / 1 / span 1 / span 1" } }, "tablet": {}, "mobile": {} }
Bemærk:Adding the styles under "all" applies to all device view ports. You can choose to specifically add it under tablet or mobile views as well.
-
Change the position of the text container inside the grid. Locate the tag: "container-image-text" and add the following styles:
"tag": "container-image-text", "customStyles": { "all": { "gap": "8px", "gridArea": "1 / 2 / span 1 / span 1" }, "tablet": {}, "mobile": {} }
-
Place the buttons within the "container-image-card" tag in the next row.
{ "tag": "container-image-card", "customStyles": {.. }, "customProperties": {… }, "childNodesCustomStyles": { "slide-item-buttons": { "all": { "gridArea": "2 / 1 / span 1 / span 2" }, "tablet": {}, "mobile": {} } } }
-
Set the text presets. Presets are part of a theme in Captivate which can be configured within the theme editor.
Locate the tag: " slide-item-caption" and change the Caption preset to “Heading4”.
"preset": "text-heading-4", "tag": "slide-item-caption",
Locate the tag: "slide-item-subtitle" and change the Subtitle preset to “Detail 1”.
"preset": "text-detail-1", "tag": "slide-item-subtitle",
Here is a comparison of how the custom design looks compared to the default design option after applying CSS grid changes:
Relaunch Captivate to see the changes to the custom design options. These will appear under the Design Options section in Visual properties.
Set custom properties
Custom properties can be accessed and adjusted in the Visual Properties panel for any content block or object. Additionally, these properties can be modified using the design option file. In this example of a custom design for the image content block, we will update a few custom properties.
-
Enable autofit by setting it to true. When autofit is enabled, the content expands to occupy the entire slide height. We recommend enabling autofit for content blocks used in layout slides, such as image and text content blocks. This is applied to all device viewports.
Locate the tag: "container-image," then under "customProperties," set autoFit to true.
"tag": "container-image", "customStyles": { .... } "customProperties": { "alignmentAndSpacing": { ..... "autoFit": true } }
-
Under the same tag: "container-image," then under "customProperties, "set imageHeight and imageBehavior.
"imageBehavior": "IG_TILE_CENTRE", “imageHeight": 768,
-
Align the caption and subtitle text to the center by modifying the customProperties for the "container-image-card," the parent container that holds these text elements. Locate the "container-image-card" tag in the design option file to do this. Under the customProperties section, find the components and update their alignment settings to center.
"tag": "container-image-card", "customStyles": { "all": { "display": "grid", "gridTemplateColumns": "1fr 1fr", "gap": "50px" }, "tablet": {}, "mobile": {} }, "customProperties": { "components": { "image": { "alignment": "left" }, "caption": { "alignment": "center" }, "subtitle": { "alignment": "center"
Here’s a preview of the custom design after applying changes to the custom properties. Start a new project in Captivate, and you’ll notice that the Autofit height is enabled by default, allowing the content to occupy the entire slide height. Additionally, text components like the Caption and Subtitle are centrally aligned.
-
locate the "tag": "container-image-card" in the designOption.json file and change add the csutom styles for tablet and mobile.
-
Set the mobile and tablet mode to flex direction.
"tag": "container-image-card", "customStyles": { "all": {...}, "tablet": { "display": "flex", "flexDirection": "column" }, "mobile": { "display": "flex", "flexDirection": "column" } }
Here’s a preview of the custom design for the tablet view after setting the flex direction to "column." Start a new project in Captivate and apply the custom design option to see all the content aligned in a single column.
-
From Installed location, copy layouts\Introduction\Introduction default to the custom folder in eLearning Assets and name the folder appropriately. In this example the new name is Custom Intro slide.
-
Open the custom introduction layout design option using a text editor and update the values of name and description fields in localized.json file.
{ "en-US": { "name": "Custom Intro slide", "description": "Custom design option For Introduction" }, "fr-FR": {} }
-
Add a unique name to the designOptionID.
{ "type": "Introduction", "name": "$$name", "description": "$$description", "designOptionId": "Custom Intro slide", "isDefault": false, "version": "1.0", "thumbnail": "thumbnail.png", "styles": [ { "tag": "image", "designOptionId": "INTRODUCTION_SINGLE_IMAGE_OPTION" } ] }
-
Set "isDefault" as false.
-
Reuse the design option of image content block created earlier and add its unique designOption ID.
{ "type": "Introduction", "name": "$$name", "description": "$$description", "designOptionId": "Custom Intro slide", "isDefault": false, "version": "1.0", "thumbnail": "thumbnail.png", "styles": [ { "tag": "image", "designOptionId": "Custom test 123" } ] }
-
Start a new project in Captivate and add an Introduction slide.
-
Select the new custom design option for the Introduction slide from the Visual properties panel.