LogoLogo
Developer HubGitHubContact Us
  • Welcome!
  • Olive Helps
    • Platform
      • How Olive Helps Works
      • Installation
      • Account Creation
      • Distributing Olive Helps
    • FAQs
      • General Loop FAQs
      • Loop Development FAQs
      • Olive Helps User FAQs
      • Security / IT FAQs
    • Data Security
      • User Data
      • Antivirus and Firewalls
  • Loop Development Kit
    • Your First Loop
      • Become a Loop Author
      • Creating a Loop
      • Build Your Loop
      • Local Loop Installation
      • Restarting Local Loops
    • Troubleshooting
    • Loop Security
      • Permissions
      • Environment Permissions
    • Loop Publication
      • Loop Approval Checklist
    • Loop Analytics Library
    • Examples
  • Documentation
  • Interfaces
  • Type Alias
  • Enumerations
  • Whisper Components
    • Base Attributes
    • Autocomplete
    • Box
    • Breadcrumb
    • Button
    • Chart
    • CollapseBox
    • Grid
    • Checkbox
    • Date Time
    • Divider
    • DropZone
    • Email
    • Icon
    • List Pair
    • Link
    • Pagination
    • Number
    • Markdown
    • Message
    • Password
    • Progress
    • Radio
    • Rating
    • RichTextEditor
    • Section Title
    • Select
    • Text Input
    • Telephone
    • Typography
  • APTITUDES
    • What are Aptitudes?
    • Browser
    • Clipboard
    • Config
    • Cursor
      • Screen Scaling Behavior
    • Document
    • Filesystem
    • Keyboard
    • Network
    • Process
    • Screen
    • Search
      • Index
    • System
    • UI
      • Loop UI Handlers
    • User
      • JWT
    • Vault
    • Whisper
      • Whisper Updates
      • JSX Whispers
    • Window
      • Screen Scaling Behavior
  • Release Notes
    • What's New
      • Olive Helps v0.55.0
      • Olive Helps v0.54.1
      • Olive Helps v0.53.1
      • Olive Helps v0.51.2
      • LDK v4.0.0
      • Olive Helps v0.50.3
      • Olive Helps v0.49.5
      • LDK v 3.18.0
      • Olive Helps v0.47.2
      • Olive Helps v0.46.2
      • LDK v 3.17.0
      • Olive Helps v0.45.4
      • Olive Helps v0.44.2
      • Olive Helps v0.43.1
      • Olive Helps v0.42.1
      • Olive Helps v0.41.4
      • Olive Helps v0.40.2
      • Olive Helps v0.39.4 & LDK v3.16.0
      • Olive Helps v0.38.8 & LDK v3.15.0
      • Olive Helps v0.36.5
      • Olive Helps v0.36.4
    • Archive
      • Olive Helps v0.36.3 & LDK v3.14.0
      • Olive Helps v0.34.4
      • LDK v3.13.0
      • Olive Helps v0.32.2 & LDK v3.12.0
      • Olive Helps v0.31.2 & LDK v3.11.0
      • Olive Helps v0.30.2 & LDK v3.10.0
      • Olive Helps v0.29.4
      • Olive Helps v0.29.3 & LDK v3.9.0
      • Olive Helps v0.28.3 & LDK v3.8.0
      • Olive Helps v0.27.7
      • Olive Helps v0.27.5
      • Olive Helps v.027.4
      • Olive Helps v0.27.2 & LDK v3.7.0
      • Olive Helps v0.25.3 & LDK v3.5.1
      • Olive Helps v0.24.6 & LDK v3.4.0
      • Olive Helps v0.23.2 & LDK v3.3.0
      • Olive Helps v0.22.3 & LDK v3.2.0
Powered by GitBook
On this page

Was this helpful?

  1. Whisper Components

Base Attributes

All Whisper Components contain certain Attributes to help identify and style the component.

PreviousEnumerationsNextAutocomplete

Last updated 2 years ago

Was this helpful?

WhisperComponents are the individual elements, whether visible or not, that build up the UI of a Whisper in Olive Helps. While each type of component produces something different, they all have some attributes in common with each other, as described below:

type WhisperComponent {
    id?: string;
    type: WhisperComponentType;
    key?: string;
    layout?: LayoutOptions;
}

Descriptions

  • id (Optional):

    • id of the component

    • Used to maintain object state across

    • undefined by default

  • type:

    • The type of component that the configuration object is creating. . Enumerations that includes Button, CheckBox, Markdown and etc.

    • This is automatically inferred when using

  • key (Optional):

    • The key is used to maintain the object state across

    • The component's key must be unique among its sibling components.

    • undefined by default

  • layout (Optional):

    • Defined . Provides a way to configure the spacing and space occupied by individual components.

    • undefined by default.

    • Note: Some component types may have their own default styling.

The layout attribute is used to modify the spacing and size of a specific component. It's value is an object of the type LayoutOptions defined below:

type StyleSize = 'none' | 'small' | 'medium' | 'large';

type WidthSize = 'full' | 'half';

interface LayoutOptions {
    flex?: string; 
    margin?: StyleSize; 
    marginBottom?: StyleSize; 
    marginLeft?: StyleSize; 
    marginTop?: StyleSize; 
    marginRight?: StyleSize; 
    padding?: StyleSize; 
    paddingBottom?: StyleSize; 
    paddingLeft?: StyleSize; 
    paddingTop?: StyleSize; 
    paddingRight?: StyleSize; 
    width?: WidthSize;
}

All properties are pretty straightforward except flex.

The flex CSS shorthand property sets how a flex item will grow or shrink to fit the space available in its flex container. This property is a shorthand for the following CSS properties:

Flex Syntax

/* Keyword values */
flex: 'auto';
flex: 'initial';
flex: 'none';

/* One value, unitless number: flex-grow */
/* flex-basis is then equal to 0. */
flex: '2';

/* One value, width/height: flex-basis */
flex: '10em';
flex: '30%';
flex: 'min-content';

/* Two values: flex-grow | flex-basis */
flex: '1 30px';

/* Two values: flex-grow | flex-shrink */
flex: '2 2';

/* Three values: flex-grow | flex-shrink | flex-basis */
flex: '2 2 10%';

OliveHelps has certain preset formats and sizes. We recommend using numbers and 'auto' instead of px or rem.

Values

initial

The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container. This is equivalent to setting "flex: 0 1 auto".

auto

The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container. This is equivalent to setting "flex: 1 1 auto".

none

The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container. This is equivalent to setting "flex: 0 0 auto".

<'flex-grow'>

<'flex-shrink'>

<'flex-basis'>

flex-grow: 0
flex-shrink: 1
flex-basis: auto

Examples

Now we can take a look of some examples when we set flex to different values. flex

is applied to Select Component.

Flex
Image

Left Box flex: 'auto'

Right Box flex: 'auto'

Left Box flex: 'auto'

Right Box flex: 'none'

Left Box flex: '2'

Right Box flex: '1'

This is a glimpse of what each WhisperComponentType can look like, as well as a brief description. You can see more features and use cases in specific Whisper component pages.

WhisperComponentType
Image

Autocomplete - A text or dropdown that is configured with a list of options, which are suggested as autocompleted options to the end user.

Box - A container component for formatting other components.

See box page

Breadcrumbs- A list of Links that display a hierarchal relationship.

Button- A interactive element that allows users to take actions and can be configured to have different weights.

Checkbox- A boolean input that has a configurable label.

CollapseBox- A container component to allow content to be opened and closed with a click on interactive text. Can be configured to open up or down.

DateTimeInput- Input field that allows the user to provide date and time information. The field can be pre-populated by the Loop.

Divider- This component shows a horizontal divider to separate different kinds of content in a Whisper. This component has no options.

DropZone- Input that give a Loop a way to receive an uploaded file from the end user. Can be configured to reject certain files.

Email- Input field that allows the end user to provide an email address.

Link- A configurable link that either can trigger a process in a Loop, or link to an external website.

ListPair- A component for presenting information where there is a bolded label on the left of a non-bolded value. Either is configurable to be copyable to the end user's clipboard.

Message- This component shows a banner in the Whisper that functions as a call to action to the user.

Number- Input field that allows the end user to provide a number within the parameters provided.

Password - Input field that allows the end user to provide a password. This field protects the end user by obscuring what they type. Showing each character as a solid black dot.

Progress- Progress components express an unspecified wait time or display the length of a process.

RadioGroup- A collection of options in which a user selects a single result. The result is selected by clicking one of the radio elements in the radio group. A selected value of -1 indicates that nothing is selected.

RichTextEditor- An input / editor that allows the end user to enter rich text, which is then output as Markdown.

SectionTitle- A presentation component that is meant to help signify a section of content. Can be configured to have a background color.

Select- A dropdown input that gives the end user a list of options to pick from. A selected value of -1 indicates that nothing is selected.

Telephone- Input field that allows the end user to provide a telephone number, automatically formatting it.

TextInput- Input field that allows the end user to provide text information. The text can be pre-populated by the Loop.

Defines the of the flex item. Negative values are considered invalid. Defaults to 1 when omitted. (initial is 0)

Defines the of the flex item. Negative values are considered invalid. Defaults to 1 when omitted. (initial is 1)

Defines the of the flex item. A preferred size of 0 must have a unit to avoid being interpreted as a flexibility. Defaults to 0 when omitted. (initial is auto)The default flex value is same as CSS's initial value, which is:

Reference :

Icon- Renders requested icon, chosen from . Icons can be placed inside of Box components.

Markdown- A basic component where can be added, granting greater flexibility with information presentation.

Whisper Updates
WhisperComponentType
JSX Whispers
Whisper Updates
LayoutOptions
flex-grow
flex-shrink
flex-basis
flex-grow
flex-shrink
flex-basis
https://developer.mozilla.org/en-US/docs/Web/CSS/flex
Material Icons
Markdown text