Package-level declarations

Skapa Components available for Android.

Types

Link copied to clipboard

AccordionSize defines the minimum height of the Accordion. The height of the container will expand if the text size is increased. Use medium and large size to add an extra caption in the accordion.

Link copied to clipboard

AccordionTextStyle defines the style variant of the Accordion. It indicates whether the title is regular or bold.

Link copied to clipboard

AvatarSize Enum class which represents the sizing of the Avatar component.

Link copied to clipboard

AvatarStyle Enum class which represents the color scheme of the Avatar component.

Link copied to clipboard
sealed class AvatarVariant

Sealed class that represents the different display types in AvatarVariant as well as the necessary properties for each type.

Link copied to clipboard

Colors for Badge

Link copied to clipboard

Sizes for Badge is the only one supporting BadgeSize.Small

Link copied to clipboard
sealed class BadgeVariant

Variants for Badge

Link copied to clipboard
object BaseField
Link copied to clipboard

Pre-defined sizes for Button component

Link copied to clipboard
sealed class ButtonVariant

Pre-defined styles for the Button component

Link copied to clipboard
sealed class CardAddon

The add-on container on top of the title supports Icon, CommercialMessage and Badge. Please note that only one add-on can be made visible.

Link copied to clipboard
Link copied to clipboard
sealed class CardFooterContent

The footer content of the Card

Link copied to clipboard
Link copied to clipboard

The Card supports different themes for communication, approved by IKEA Brand team.

Link copied to clipboard

Styled variants for Card

Link copied to clipboard
data class CarouselDismissParams(val onDismissClicked: () -> Unit, val dismissButtonContentDescription: String? = null)

Data class that represent the necessary data to add an close CarouselDismissParams in the component.

Link copied to clipboard

Used to adjust the space between items, using a predetermined set of Space tokens

Link copied to clipboard
sealed class CarouselVariant

CarouselVariant enum class which defines the variant of the Carousel component.

Link copied to clipboard
data class CharacterCounterParams(@IntRange(from = 0, to = 9223372036854775807) val characterLimit: Int, val accessibilityCharacterLimitMessage: String?)

Character limit counter values.

Link copied to clipboard
data class CheckboxGroupItem<T>(val key: T, val label: String, var checked: Boolean = false, val enabled: Boolean = true)

Data class used for CheckboxGroup

Link copied to clipboard

Appearance of the Checkbox

Link copied to clipboard
data class ChoiceContent(val title: String? = null, val caption: String? = null, val addon: @Composable () -> Unit? = null, val expandingText: String? = null)

Content interface for Choice.

Link copied to clipboard

Content alignment options for leading and trailing content for Choice component.

Link copied to clipboard
data class ChoiceGroupItem<T>(val key: T, val content: ChoiceContent, val leadingContent: ChoiceLeadingContent = ChoiceLeadingContent.None, val trailingContent: ChoiceTrailingContent = ChoiceTrailingContent.None, val enabled: Boolean = true)

Data class used for Choice group items.

Link copied to clipboard

Leading content for Choice: Icon, Payment Logo, or Image

Link copied to clipboard

Sizes for Choice. The sizes affect the minimum height of the component. Keep in mind that the small variant should ideally be used without a caption or larger add-ons. If the content is larger than the container, it will grow accordingly.

Link copied to clipboard

Trailing content for Choice: Icon, Image, Text, or Price.

Link copied to clipboard
sealed class CompactCardAddon

The add-on container in the media container supports CommercialMessage and Badge. Please note that only one add-on can be made visible.

Link copied to clipboard

Regular Compact Card is available in two themes: Default and Inverse. Default theme is used on white/black (neutral-1) backgrounds, while the Inverse theme is used on top of coloured and neutral surfaces.

Link copied to clipboard

Regular Compact Card with a content container background surface that provides a stronger visual contrast and creates a more contained expression. Simple Compact Card with a content container lacking background surface colour and padding.

Link copied to clipboard

Provides required choice between Image and Video content.

Link copied to clipboard
data class DismissParams(val onDismissRequest: () -> Unit, val dismissButtonContentDescription: String? = null)

Data class that represent the necessary data to add an close DismissParams in a component.

Link copied to clipboard

Orientation to use with Dual button Use DualButtonOrientation.Horizontal to have the buttons side-by-side. Use DualButtonOrientation.Vertical to stack the buttons vertically.

Link copied to clipboard
data class DualButtonParams(@DrawableRes val iconResource: Int, val contentDescription: String, val enabled: Boolean = true, val interactionSource: MutableInteractionSource? = null)

Data class for DualButton content.

Link copied to clipboard

Position for Dual button First is the Start Orientation.Horizontal or Top Orientation.Vertical Second is the End Orientation.Horizontal or Bottom Orientation.Vertical

Link copied to clipboard

DualButtonSize Small or Medium. Default is Medium.

Link copied to clipboard

Use DualButtonVariant.Primary to stand out on top of images or other graphics such as interactive maps. Uses Static colors. Use DualButtonVariant.Secondary for low emphasis. Adapts to Light/Dark Themes. Use DualButtonVariant.SecondaryInverse Use secondary inverse dual buttons for low emphasis on dark backgrounds. Uses static colors.

Link copied to clipboard

States primarily used for Input field and Text areas, but also other components that need both Enabled, Disabled and ReadOnly.

Link copied to clipboard
Link copied to clipboard

Fail reason for Shoppable image products

Link copied to clipboard

Enum class used for Prompt footer alignment when two buttons are used.

Link copied to clipboard

Represents choice between Primary and Secondary button variant for CardFooterContent.

Link copied to clipboard
data class HelperTextParams(val state: HelperTextState, val label: String? = null)

Helper class for Helper text parameters

Link copied to clipboard
Link copied to clipboard

Helper text states

Link copied to clipboard

Pre-defined colours for Hyperlink component

Link copied to clipboard

Pre-defined sizes for IconButton

Link copied to clipboard
sealed class IconButtonVariant

Pre-defined styles for the IconButton component

Link copied to clipboard
data class IconParams(val position: IconPosition.Horizontal, @DrawableRes val iconId: Int?, val contentDescription: String?, val onClick: () -> Unit? = null)

Icon parameters for clickable icons used in eg. Input field related components.

Link copied to clipboard

Pre-defined sizes for IconPill

Link copied to clipboard
data class ImageParams(val painter: Painter, val contentDescription: String?, val aspectRatio: SkapaAspectRatio = SkapaAspectRatio.Ratio16by9)

Data class to be used for header images in Card component.

Link copied to clipboard
data class InlineMessageActionParams(val label: String, val onClick: () -> Unit)
Link copied to clipboard
Link copied to clipboard

Pre-defined accentuation for Inline message styling.

Link copied to clipboard

Pre-defined Inline message variants.

Link copied to clipboard

Enum class to handle InlineMessage visibility state, changing the state will trigger AnimatedVisibility effect on the component

Link copied to clipboard

Variants for Jumbo buttons

Link copied to clipboard

Interface used to determine if item in list is header

Link copied to clipboard
data class ListBoxItemsParams<T : ListBoxItemHeader>(val items: List<T>, val itemContent: @Composable (T) -> Unit, val contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, val onItemClick: (T) -> Unit?)

Data class that represents a list of items that Implement ListBoxItemHeader interface and is used to separate the items by headers

Link copied to clipboard
Link copied to clipboard

Trailing controls are used to distinguish between Navigation and Action behaviour.

Link copied to clipboard
sealed class ListViewItemImage

Leading content: Text, Icon, Image, Payment Logo or Avatar All list view item sizes supports leading content. Please note that Leading image and Medium Payment logos are only supported in Medium and Large list view items. Small list view items also supports a small version of the payment logo container.

Link copied to clipboard

ListViewItemSize defines the minimum height of the List View Item container. All list view item variants are available in three different sizes. The height of the container will expand if the text size is increased. Use medium and large list view items for images and double lines of text.

Link copied to clipboard

Controls the title text style of the ListViewItem component.

Link copied to clipboard

Sizes for LoadingBall component

Link copied to clipboard

Color variants for LoadingBall component

Link copied to clipboard
sealed class MediaContainer
Link copied to clipboard
sealed class MenuItemImage

Leading content: Only Icon for now All menu item sizes supports leading content.

Link copied to clipboard

Enum class used for Modals footer alignment when two buttons are used.

Link copied to clipboard
sealed class ModalHeader
Link copied to clipboard
data class ModalHeaderAction(@DrawableRes val iconResource: Int, val contentDescription: String? = null, val action: () -> Unit)

A ModalHeaderAction is represented as an IconButton added to the header component

Link copied to clipboard
data class ModalHeaderParams(val variant: ModalsHeaderVariant, val title: String? = null, val trailingAction: ModalHeaderAction? = null, val leadingAction: ModalHeaderAction? = null)

Class that represents the necessary data to build a ModalHeader

Link copied to clipboard
data class ModalsActionFooterParams(val buttonAlignment: ModalFooterButtonAlignment = ModalFooterButtonAlignment.SideBySide, val primaryButton: @Composable () -> Unit, val secondaryButton: @Composable () -> Unit?)

Class that represents the necessary data to build a ModalsActionFooter

Link copied to clipboard
data class NavButtonParams(val forwardButtonContentDescription: String, val backButtonContentDescription: String)

Data class that represents the necessary data to add navigation buttons in the component.

Link copied to clipboard

PaymentLogoSize defines the overall size of the Payment Logo container.

Link copied to clipboard
data class PillGroupItem(val key: Any?, val label: String, var selected: Boolean = false)

Data class used for PillGroup

Link copied to clipboard

State of the PillGroup component. It determines if the group is either PillGroupState.Expanded or PillGroupState.Collapsed

Link copied to clipboard

Sizes for Pill component

Link copied to clipboard
data class PromptAction(val label: String, val action: () -> Unit)

Data class used for Prompt primaryAction & secondaryAction

Link copied to clipboard
class QuantityStepperActions(val onDecrease: (Int) -> Unit? = null, val onIncrease: (Int) -> Unit? = null, val onInputValueChange: (Int) -> Unit? = null)

The QuantityStepperActions class actions that will be triggered in response to users triggering an input action on the QuantityStepper component. This can be used together with the default onValueChange param.

Link copied to clipboard

QuantityStepperSize defines the overall size of the Quantity Stepper component.

Link copied to clipboard
Link copied to clipboard
data class RadioGroupItem<T>(val key: T, val label: String, val enabled: Boolean = true, val caption: String? = null)

Data class used for RadioButtonGroup

Link copied to clipboard
Link copied to clipboard

The size of the segmented control items using icons.

Link copied to clipboard
sealed class SegmentedControlItem<T>

The items that can be displayed in a segmented control.

Link copied to clipboard

The visual styling of the Segmented Control. Allow users to switch between two visualisation modes without changing content.

Link copied to clipboard

The size of the segmented control items using text labels. Note: The Small variant is not allowed with the SegmentedControlItem.Icon, it will default to Medium sizing.

Link copied to clipboard
data class SelectInteractionParams(val onClick: (Boolean) -> Unit, val onClickContentDescription: String?, val enabled: Boolean = true)

Select interaction params

Link copied to clipboard

Style for Choice In most cases, emphasised styles are preferred, as it’s important to highlight user selections. Subtle styles are useful in contexts where the coloured selection competes in the hierarchy of nearby elements, like other emphasised elements, or coloured content within the Choice Button content.

Link copied to clipboard
data class SelectItemsParams<T>(val items: List<T>, val itemContent: @Composable (T) -> Unit, val onItemSelected: (T) -> Unit, val onDismissRequest: () -> Unit, val itemContentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, val fluidMenu: Boolean = false, val selectedItem: T? = null)

Class that controls the aspects related with the Select items

Link copied to clipboard
class SheetState(initialValue: SheetValue, animationSpec: AnimationSpec<Float> = SwipeableDefaults.AnimationSpec, val confirmStateChange: (SheetValue) -> Boolean = { true }) : SwipeableState<SheetValue>

State of the SheetState composable.

Link copied to clipboard

Possible values of SheetState.

Link copied to clipboard
data class ShopAllButtonParams(val label: String, val visible: Boolean = true, val onClick: () -> Unit)

Params for Shop all button. Uses a ButtonVariant.ImageOverlay when rendered.

Link copied to clipboard
data class ShoppableImageBackgroundParams(val painter: Painter, val contentDescription: String?, val aspectRatio: SkapaAspectRatio = SkapaAspectRatio.Ratio3by4, val onClick: () -> Unit)

Data class to be used for the background image used together with ShoppableImage.

Link copied to clipboard
data class ShoppableImageItem<T>(val key: T, @FloatRange(from = 0.0, to = 1.0) val xCoordinate: Float, @FloatRange(from = 0.0, to = 1.0) val yCoordinate: Float, val content: @Composable () -> Unit, val contentDescription: String? = null, val onClick: () -> Unit? = null)

Shoppable image item data class. This is is used together with the ShoppableImage component to display products or other information on top of an image.

Link copied to clipboard

Set of aspect ratios defined by Skapa

Link copied to clipboard
object SkapaImage

This Object provides the necessary properties to build an Skapa Image component

Example of usage


Link copied to clipboard

Position of the status dot when if used with label

Link copied to clipboard

Sizes for Status component

Link copied to clipboard

Styles for Status component

Link copied to clipboard

Appearance of the Switch

Link copied to clipboard
sealed class TabItem

Tab item can have two Implementations Text only and Text and Icon.

Link copied to clipboard

TabVariant is used to define the style of the tabs.

Link copied to clipboard

Colors for Tag

Link copied to clipboard

Different sizes for title for different sizes of CompactCard.

Link copied to clipboard
sealed class ToggleItem

Data class for Toggle content.

Functions

Link copied to clipboard
fun Accordion(title: String, modifier: Modifier = Modifier, caption: String? = null, open: Boolean = false, size: AccordionSize = AccordionSize.Medium, textStyle: AccordionTextStyle, horizontalPadding: Dp = SkapaSpacing.space150, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (open: Boolean) -> Unit, content: @Composable () -> Unit)
fun Accordion(title: String, modifier: Modifier = Modifier, leadingImage: ListViewItemImage = ListViewItemImage.None, annotatedCaption: AnnotatedString? = null, open: Boolean = false, size: AccordionSize = AccordionSize.Medium, textStyle: AccordionTextStyle, showDivider: Boolean = true, horizontalPadding: Dp = SkapaSpacing.space150, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (open: Boolean) -> Unit, content: @Composable () -> Unit)
fun Accordion(title: String, modifier: Modifier = Modifier, leadingImage: ListViewItemImage = ListViewItemImage.None, caption: String? = null, open: Boolean = false, size: AccordionSize = AccordionSize.Medium, textStyle: AccordionTextStyle = AccordionTextStyle.Emphasised, showDivider: Boolean = true, horizontalPadding: Dp = SkapaSpacing.space150, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (open: Boolean) -> Unit, content: @Composable () -> Unit)

Accordion component is usually used as a list of headers that hide or reveal additional content when selected.

Link copied to clipboard
fun AspectRatioBox(aspectRatio: SkapaAspectRatio, modifier: Modifier = Modifier, propagateMinConstraints: Boolean = false, background: Color = SkapaTheme.colors.neutral2, content: @Composable BoxScope.() -> Unit)

A wrap box container for presenting visual media, in Skapa standardised aspect ratios

Example of usage


Link copied to clipboard
fun Avatar(variant: AvatarVariant, contentDescription: String?, modifier: Modifier = Modifier, style: AvatarStyle = AvatarStyle.Primary, static: Boolean = true, size: AvatarSize = AvatarSize.Medium, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit? = null)

Avatar is a visual representation of a user profile either by image, icon or text.

Link copied to clipboard
fun Badge(variant: BadgeVariant, color: BadgeColor, modifier: Modifier = Modifier)

Badge is a non-interactable component for informational purposes.

Link copied to clipboard
fun BottomSheet(sheetContent: @Composable () -> Unit, modifier: Modifier = Modifier, sheetState: SheetState = rememberSheetState(SheetValue.Hidden), modalHeaderParams: ModalHeaderParams? = null, sheetFooterParams: ModalsActionFooterParams? = null, dividers: Boolean = false, background: Color = SkapaTheme.colors.elevation2, contentHorizontalPadding: Dp = SheetProps.DefaultPadding, onDismiss: () -> Unit? = null)

Sheet is a modal window that dims and disables the parent view allowing for a short, focused task or providing additional information before returning to the main screen. They are an alternative to inline menus and simple dialogs, providing additional room for content, iconography, and actions.

Link copied to clipboard
fun BottomSheetM3(sheetContent: @Composable () -> Unit, open: Boolean, modifier: Modifier = Modifier, sheetState: SheetState = rememberModalBottomSheetState(skipPartiallyExpanded = true), modalHeader: ModalHeader = ModalHeader.Resizeable, sheetFooterParams: ModalsActionFooterParams? = null, dividers: Boolean = false, background: Color = SkapaTheme.colors.elevation2, contentHorizontalPadding: Dp = SheetM3Props.DefaultPadding, contentWindowInsets: @Composable () -> WindowInsets = { BottomSheetDefaults.windowInsets }, onDismiss: () -> Unit? = null)

Sheet is a modal window that dims and disables the parent view allowing for a short, focused task or providing additional information before returning to the main screen. They are an alternative to inline menus and simple dialogs, providing additional room for content, iconography, and actions.

Link copied to clipboard
fun Button(label: String, modifier: Modifier = Modifier, enabled: Boolean = true, variant: ButtonVariant = ButtonVariant.Primary, size: ButtonSize = ButtonSize.Medium, loading: Boolean = false, @DrawableRes iconId: Int? = null, iconPosition: IconPosition.Horizontal = IconPosition.Horizontal.Leading, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Button component is a control used to perform actions when triggered. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun Card(title: String, modifier: Modifier = Modifier, label: String? = null, addon: CardAddon = CardAddon.None, subTitle: String? = null, body: String? = null, variant: CardV2Variant = CardV2Variant.Regular, cardTheme: CardTheme? = CardTheme.Default, mediaContainer: MediaContainer? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, cardFooterContent: CardFooterContent? = null, onClick: () -> Unit)

Card 2.0 is a component that displays grouped content and actions on a single topic. It provides an entry point to more detailed information.

Link copied to clipboard
fun CardEmphasised(title: String, modifier: Modifier = Modifier, size: CardTextSize = CardTextSize.Regular, body: String? = null, label: String? = null, imageParams: ImageParams? = null, ctaAction: String? = null, roundedCorners: Boolean = false, contentColor: Color = Color.Unspecified, backgroundColor: Color = Color.Unspecified, buttonVariant: CardButtonVariant = CardButtonVariant.Primary, elevation: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Card Emphasised is a Card with a background that provides a stronger visual contrast and creates a more traditional card silhouette.

fun CardEmphasised(title: String, modifier: Modifier = Modifier, size: CardTextSize = CardTextSize.Regular, body: String? = null, label: String? = null, image: Painter? = null, imageContentDescription: String? = null, ctaAction: String? = null, roundedCorners: Boolean = false, contentColor: Color = Color.Unspecified, backgroundColor: Color = Color.Unspecified, buttonVariant: CardButtonVariant = CardButtonVariant.Primary, elevation: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Deprecated Emphasised Card.

Link copied to clipboard
fun CardRegular(title: String, modifier: Modifier = Modifier, size: CardTextSize = CardTextSize.Regular, body: String? = null, label: String? = null, imageParams: ImageParams? = null, ctaLabel: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Card Regular is a background-less Card that blends passively into the page.

fun CardRegular(title: String, modifier: Modifier = Modifier, size: CardTextSize = CardTextSize.Regular, body: String? = null, label: String? = null, image: Painter? = null, imageContentDescription: String? = null, ctaLabel: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Deprecated Regular Card.

Link copied to clipboard
fun Carousel(state: LazyListState, count: Int, dismissParams: DismissParams?, modifier: Modifier = Modifier, itemSpacing: Boolean = false, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, variant: CarouselVariant = CarouselVariant.SlideShow, key: (page: Int) -> Any? = null, flingBehavior: FlingBehavior? = null, a11ySkipListing: A11ySkipListing? = null, content: @Composable (page: Int) -> Unit)
fun Carousel(state: LazyListState, count: Int, dismissParams: DismissParams?, itemSpacing: CarouselItemSpacing, modifier: Modifier = Modifier, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, variant: CarouselVariant = CarouselVariant.SlideShow, key: (page: Int) -> Any? = null, flingBehavior: FlingBehavior? = null, a11ySkipListing: A11ySkipListing? = null, navButtonParams: NavButtonParams? = null, content: @Composable (page: Int) -> Unit)

Carousel is a container used to horizontally slide or cycle through content placed inside of it. This Implementation does not have a counter badge on display.

fun Carousel(state: LazyListState, count: Int, counterBadgeFormatter: (Int) -> String, dismissParams: DismissParams?, modifier: Modifier = Modifier, itemSpacing: Boolean = false, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, variant: CarouselVariant = CarouselVariant.SlideShow, key: (page: Int) -> Any? = null, flingBehavior: FlingBehavior? = null, a11ySkipListing: A11ySkipListing? = null, content: @Composable (page: Int) -> Unit)
fun Carousel(state: LazyListState, count: Int, counterBadgeFormatter: (Int) -> String, dismissParams: DismissParams?, itemSpacing: CarouselItemSpacing, modifier: Modifier = Modifier, reverseScrollDirection: Boolean = false, isScrollEnabled: Boolean = true, variant: CarouselVariant = CarouselVariant.SlideShow, key: (page: Int) -> Any? = null, flingBehavior: FlingBehavior? = null, a11ySkipListing: A11ySkipListing? = null, navButtonParams: NavButtonParams? = null, content: @Composable (page: Int) -> Unit)

Carousel is a container used to horizontally slide or cycle through content placed inside of it. This Implementation has a counter badge on display and is accessed through the counterBadgeFormatter property, if you choose CarouselVariant.Overflow the counter will no be shown.

Link copied to clipboard
fun Checkbox(checked: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onCheckedChange: (Boolean) -> Unit?)
fun Checkbox(label: String, checked: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, error: Boolean = false, helperText: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onCheckedChange: (Boolean) -> Unit?)
fun Checkbox(label: String, checked: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, caption: String? = null, helperTextErrorLabel: String?, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onCheckedChange: (Boolean) -> Unit?)

Checkbox component is a control that toggles between checked and unchecked as its default states. Used to choose one or more options from a limited number of options.

Link copied to clipboard
fun <T> CheckboxGroup(items: List<CheckboxGroupItem<T>>, modifier: Modifier = Modifier, groupName: String? = null, variant: CheckboxVariant = CheckboxVariant.Emphasised, onItemChecked: (index: Int, item: CheckboxGroupItem<T>, checked: Boolean) -> Unit)

Checkbox Group component allows Checkboxes to be combined together with a Text inside a Column to achieve group-like behaviour.

Link copied to clipboard
fun <T> Choice(items: List<ChoiceGroupItem<T>>, selected: T?, modifier: Modifier = Modifier, style: SelectionEmphasis = SelectionEmphasis.Emphasised, size: ChoiceSize = ChoiceSize.Large, onItemSelected: (item: ChoiceGroupItem<T>) -> Unit)

This is the grouped Composable function for Choice.

fun Choice(content: ChoiceContent, modifier: Modifier = Modifier, leadingContent: ChoiceLeadingContent = ChoiceLeadingContent.None, trailingContent: ChoiceTrailingContent = ChoiceTrailingContent.None, selected: Boolean = false, style: SelectionEmphasis = SelectionEmphasis.Emphasised, size: ChoiceSize = ChoiceSize.Large, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

This is the stand-alone Choice Composable, with this power comes great responsibility. This is only to be used if the list layout variant we provide isn't enough, and a custom layout is needed. Please follow guidelines available on Choice info and guidelines

Link copied to clipboard
fun CompactCard(title: String, compactMediaContainer: CompactMediaContainer, modifier: Modifier = Modifier, label: String? = null, addon: CompactCardAddon = CompactCardAddon.None, variant: CompactCardVariant = Regular, compactCardTheme: CompactCardTheme? = null, showArrow: Boolean = true, titleSize: TitleSize = TitleSize.Regular, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Compact Card is a component that displays simple content and an entry point to other pages for more detailed information.

Link copied to clipboard
fun Divider(modifier: Modifier = Modifier, orientation: Orientation = Orientation.Horizontal)

Divider is a thin grey keyline that help create subsections of content.

fun Divider(modifier: Modifier = Modifier)
Link copied to clipboard
fun Dropdown(hint: String, label: String, onClick: (Boolean) -> Unit, expanded: Boolean, onClickContentDescription: String?, modifier: Modifier = Modifier, helperText: String? = null, enabled: Boolean = true, selected: Boolean = false, active: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, state: BaseField.State = BaseField.State.Default)

Dropdown component can be used as a trigger for ListBox, Prompt, BottomSheet or other container components to display a list of options to choose

Link copied to clipboard
fun DualButton(firstButton: DualButtonParams, secondButton: DualButtonParams, modifier: Modifier = Modifier, variant: DualButtonVariant = DualButtonVariant.Primary, size: DualButtonSize = DualButtonSize.Medium, orientation: Orientation = Orientation.Horizontal, onClick: (position: DualButtonPosition) -> Unit)

Dual button is a group of two buttons with binary actions.

Link copied to clipboard
fun Expander(labelOpen: String, labelClosed: String, modifier: Modifier = Modifier, open: Boolean, variant: ExpanderVariant = Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (Boolean) -> Unit, content: @Composable () -> Unit)

Expander component allows user to reveals and hide extra content.

Link copied to clipboard
fun HelperText(label: String, state: HelperTextState, modifier: Modifier = Modifier)

Helper Text is a validation component designed to help out and provide guidance to form elements. This component consists only of an icon indicator and a label and it should be used together with other components.

Link copied to clipboard
fun Hyperlink(text: String, active: Boolean, modifier: Modifier = Modifier, style: TextStyle = LocalTextStyle.current, color: HyperlinkColor = HyperlinkColor.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Hyperlink A text component that is able to handle click event on the text.

Link copied to clipboard
fun hyperlinkStyle(color: HyperlinkColor = HyperlinkColor.Default, active: Boolean): SpanStyle

HyperlinkStyle method is meant to be style text as an Skapa Hyperlink component in those cases the raw component is not enough by itself

Link copied to clipboard
fun IconButton(iconResource: Int, contentDescription: String?, modifier: Modifier = Modifier, enabled: Boolean = true, variant: IconButtonVariant = IconButtonVariant.Primary, size: IconButtonSize = IconButtonSize.Medium, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, loading: Boolean = false, onClick: () -> Unit)

Icon Button component a button for compact spaces that is labelled with an icon instead of text. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun IconPill(@DrawableRes iconResource: Int, contentDescription: String?, modifier: Modifier = Modifier, enabled: Boolean = true, size: IconPillSize = IconPillSize.Medium, selected: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Icon Pill component is a button that represents an attribute or unit of data. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun InlineMessage(body: String, modifier: Modifier = Modifier, title: String? = null, variant: InlineMessageVariant = InlineMessageVariant.Informative, @DrawableRes iconId: Int? = R.drawable.ic_inline_message_informative, style: InlineMessageStyle = InlineMessageStyle.Emphasised, visibility: InlineMessageVisibility = InlineMessageVisibility.Visible, dismissible: DismissParams? = null)
fun InlineMessage(body: String, actions: InlineMessageActions, modifier: Modifier = Modifier, title: String? = null, variant: InlineMessageVariant = InlineMessageVariant.Informative, @DrawableRes iconId: Int? = R.drawable.ic_inline_message_informative, visibility: InlineMessageVisibility = InlineMessageVisibility.Visible, dismissible: DismissParams? = null)

Inline Message is use to displays highly contextual, non-interruptive messages inline with content.

Link copied to clipboard
fun InputField(value: String, onChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, prefixLabel: String? = null, suffixLabel: String? = null, helperText: String? = null, @IntRange(from = 0, to = 9223372036854775807) characterLimit: Int = 0, accessibilityCharacterLimitMessage: String? = null, enabled: Boolean = true, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, state: BaseField.State = BaseField.State.Default)

Input Field enables users to edit text via hardware or software keyboard, providing different decorations such as Label, helper text, prefix and more. Whenever the user edits the text, onChange is called with the most up to date state represented by value. value contains the text entered by user. Note: If apart from Suffix/Prefix decorator you also want leading or trailing icon use the InputField overload with the IconId parameter instead.

fun InputField(value: String, onChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, iconParams: IconParams? = null, prefixLabel: String? = null, suffixLabel: String? = null, helperTextParams: HelperTextParams = HelperTextParams.None, characterCounterParams: CharacterCounterParams = CharacterCounterParams.None, enabledState: EnabledState = EnabledState.Enabled, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
fun InputField(value: String, onChange: (String) -> Unit, label: String, @DrawableRes iconId: Int?, iconOnClick: () -> Unit?, iconContentDescription: String?, modifier: Modifier = Modifier, iconPosition: IconPosition.Horizontal = IconPosition.Horizontal.Leading, prefixLabel: String? = null, suffixLabel: String? = null, helperText: String? = null, @IntRange(from = 0, to = 9223372036854775807) characterLimit: Int = 0, accessibilityCharacterLimitMessage: String? = null, enabled: Boolean = true, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, state: BaseField.State = BaseField.State.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

This overload of Input Field enables users to edit text via hardware or software keyboard, providing different decorations same decorators plus icons. Whenever the user edits the text, onChange is called with the most up to date state represented by value. value contains the text entered by user.

Link copied to clipboard
fun JumboButton(label: String, modifier: Modifier = Modifier, enabled: Boolean = true, variant: JumboButtonVariant = JumboButtonVariant.Regular, loading: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Jumbo Button component is a control used to trigger the final action on a linear flow. It has a predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun <T : ListBoxItemHeader> ListBox(expanded: Boolean, itemParams: ListBoxItemsParams<T>, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, useSafeHeight: Boolean = true)
fun <T> ListBox(expanded: Boolean, items: List<T>, itemContent: @Composable (T) -> Unit, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, contentPadding: PaddingValues = MenuDefaults.DropdownMenuItemContentPadding, useSafeHeight: Boolean = true, onItemClick: (T) -> Unit?)

Wrapped Material DropdownMenu with Skapa features, used to display select options

Link copied to clipboard
fun ListViewItem(title: @Composable () -> Unit, modifier: Modifier = Modifier, description: @Composable () -> Unit? = null, leading: @Composable RowScope.() -> Unit? = null, trailing: @Composable RowScope.() -> Unit? = null, addons: @Composable () -> Unit? = null, size: ListViewItemSize = ListViewItemSize.Medium, contentHorizontalPadding: Dp = SkapaSpacing.space150, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit?)

List View Item consist of one or more items and can contain actions represented by Icons and text. The List View Item is available in three sizes. Small for one line text, medium and large.

fun ListViewItem(title: String, modifier: Modifier = Modifier, description: String? = null, leadingImage: ListViewItemImage = ListViewItemImage.None, trailingControl: ListViewItemControls = ListViewItemControls.None, quantityLabel: @Composable () -> Unit? = null, addons: @Composable () -> Unit? = null, size: ListViewItemSize = ListViewItemSize.Medium, contentHorizontalPadding: Dp = SkapaSpacing.space150, textStyle: ListViewItemTextStyle = ListViewItemTextStyle.Regular, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit?)
fun ListViewItem(title: String, modifier: Modifier = Modifier, description: String? = null, leadingImage: ListViewItemImage = ListViewItemImage.None, trailingControl: ListViewItemControls = ListViewItemControls.None, quantityLabel: String?, addons: @Composable () -> Unit? = null, size: ListViewItemSize = ListViewItemSize.Medium, contentHorizontalPadding: Dp = SkapaSpacing.space150, textStyle: ListViewItemTextStyle = ListViewItemTextStyle.Regular, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit?)

List View Item consists of one or more items and can contain actions represented by Icons and text. The List View Item is available in three sizes. Small for one line text, medium and large.

Link copied to clipboard
fun LoadingBall(modifier: Modifier = Modifier, variant: LoadingBallVariant = LoadingBallVariant.Emphasised, size: LoadingBallSize = LoadingBallSize.Medium)
fun LoadingBall(text: String, modifier: Modifier = Modifier, variant: LoadingBallVariant = LoadingBallVariant.Emphasised, labelTransition: Boolean = false)

LoadingBall is used when there is a indeterminate loading time, when it is not possible to know the completion time. Meant to be used when the process lasts between 2 to 10 seconds.

Link copied to clipboard
fun LoadingLinear(modifier: Modifier = Modifier, text: String? = null, progress: Float = 0.0f, labelPosition: LabelPosition.Horizontal = LabelPosition.Horizontal.Center, labelTransition: Boolean = false, width: Dp = IndicatorWidth)

Loading Linear is used when there is a determinate loading time, when it is possible to know the completion time. Meant to be used when the process takes more than 10 seconds. Preferable when time remaining can be displayed.

Link copied to clipboard
fun MenuItem(title: String, modifier: Modifier = Modifier, selected: Boolean = false, leadingImage: MenuItemImage = MenuItemImage.None, quantityLabel: String? = null, enabled: Boolean = true, contentHorizontalPadding: Dp = SkapaSpacing.space150, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onSelected: () -> Unit?)

Composable to be use for selection patters with ListBox, Sheet and Prompt.

Link copied to clipboard
fun PaymentLogo(bitmap: ImageBitmap, contentDescription: String?, modifier: Modifier = Modifier, size: PaymentLogoSize = PaymentLogoSize.Medium)
fun PaymentLogo(painter: Painter, contentDescription: String?, modifier: Modifier = Modifier, size: PaymentLogoSize = PaymentLogoSize.Medium)
fun PaymentLogo(imageVector: ImageVector, contentDescription: String?, modifier: Modifier = Modifier, size: PaymentLogoSize = PaymentLogoSize.Medium)
fun PaymentLogo(@DrawableRes iconId: Int, contentDescription: String?, modifier: Modifier = Modifier, size: PaymentLogoSize = PaymentLogoSize.Medium)

Payment Logo is a Container for payment provider logos. Our payment logo container is an empty container that comes with a few pre-defined rules such as sizing and borders and sizing.

Link copied to clipboard
fun Pill(label: String, modifier: Modifier = Modifier, enabled: Boolean = true, size: PillSize = PillSize.Medium, selected: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Pill component is a button that represents an attribute or unit of data. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

fun Pill(label: String, thumbnail: Painter, modifier: Modifier = Modifier, enabled: Boolean = true, size: PillSize = PillSize.Medium, selected: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Pill component with Thumbnail is a button that represents an attribute or unit of data. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

fun Pill(label: String, @DrawableRes iconId: Int, modifier: Modifier = Modifier, enabled: Boolean = true, size: PillSize = PillSize.Medium, selected: Boolean = false, iconPosition: IconPosition.Horizontal = IconPosition.Horizontal.Leading, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Pill component with Icon is a button that represents an attribute or unit of data. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

fun Pill(label: String, @DrawableRes iconId: Int, @IntRange(from = 0) badgeValue: Int, modifier: Modifier = Modifier, enabled: Boolean = true, size: PillSize = PillSize.Medium, selected: Boolean = false, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit)

Pill component with Icon and Badge is a button that represents an attribute or unit of data. It's built on top of androidx.compose.material.Button and comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun PillGroup(items: List<PillGroupItem>, modifier: Modifier = Modifier, size: PillSize = PillSize.Medium, alignment: Alignment.Horizontal = Alignment.CenterHorizontally, @IntRange(from = 1, to = 2147483647) maxVisibleItems: Int = items.size, expandedButtonLabel: String? = null, state: PillGroupState = PillGroupState.Collapsed, onStateChanged: (state: PillGroupState) -> Unit, onClickItem: (position: Int, item: PillGroupItem) -> Unit)

Pill Group component allows Pills to be combined together inside a Row to achieve group-like behaviour. PillGroup implements the fixed-width container behaviour and wrap pills onto new rows, similar to a paragraph of text. The container height can be controlled by determining a maximum number of visible pills. When the number of maximum visible pills is set, an overflow button allows users to reveal the remaining content. Actions bound to the overflow button can vary.

Link copied to clipboard
fun Prompt(header: String, primaryAction: PromptAction, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, dialogProperties: DialogProperties = DialogProperties(), content: @Composable () -> Unit)
fun Prompt(header: String, primaryAction: PromptAction, secondaryAction: PromptAction, onDismissRequest: () -> Unit, modifier: Modifier = Modifier, buttonAlignment: FooterButtonAlignment = FooterButtonAlignment.SideBySide, dialogProperties: DialogProperties = DialogProperties(), content: @Composable () -> Unit)

Prompt is a modal window that appears in the centre of a screen, disabling the content below. It interrupts the user with a critical task, decision, or acknowledgement that needs to be addressed before continuing. It's built on top of androidx.compose.ui.window.Dialog and comes with a predefined appearance based on Skapa design and guidelines (https://skapa.ikea.net/).

Link copied to clipboard
fun QuantityStepper(value: Int, modifier: Modifier = Modifier, @IntRange(from = 0) minValue: Int = MinValueDefault, @IntRange(from = 0) maxValue: Int = MaxValueDefault, size: QuantityStepperSize = QuantityStepperSize.Medium, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, increaseButtonContentDescription: String?, decreaseButtonContentDescription: String?, onValueChange: (Int) -> Unit)

QuantityStepper component allows you to select an number value by increasing/decreasing that value with the button controls or writing the value directly in the input field inside the component

fun QuantityStepper(value: Int, decreaseButtonContentDescription: String?, increaseButtonContentDescription: String?, modifier: Modifier = Modifier, @IntRange(from = 0) minValue: Int = MinValueDefault, @IntRange(from = 0) maxValue: Int = MaxValueDefault, size: QuantityStepperSize = QuantityStepperSize.Medium, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, imeAction: ImeAction = ImeAction.Default, keyboardActions: KeyboardActions = KeyboardActions.Default, quantityStepperActions: QuantityStepperActions = QuantityStepperActions.Default, onValueChange: (Int) -> Unit)

QuantityStepper component allows you to select an number value by increasing/decreasing that value with the button controls or writing the value directly in the input field inside the component.

Link copied to clipboard
fun RadioButton(selected: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: RadioButtonVariant = Emphasised, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit?)
fun RadioButton(label: CharSequence, selected: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: RadioButtonVariant = Emphasised, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, caption: String? = null, onClick: () -> Unit?)

Radio Button component is a control that allows a single selection of a list of mutually exclusive options. It's built on top of androidx.compose.material.RadioButton and comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard
fun <T> RadioButtonGroup(items: List<RadioGroupItem<T>>, selected: T?, modifier: Modifier = Modifier, groupName: String? = null, variant: RadioButtonVariant = Emphasised, onItemSelected: (item: RadioGroupItem<T>) -> Unit)

Radio Button Group component allows RadioButtons to be combined together with a Text inside a Column to achieve group-like behaviour. We recommend using no more than five radio buttons in a layout.

Link copied to clipboard
fun Rating(@FloatRange(from = 0.0, to = 5.0) value: Float, contentDescription: String?, modifier: Modifier = Modifier, ratingLabel: String? = null, quantityLabel: String? = null, size: RatingSize = RatingSize.Regular, onClick: () -> Unit? = null)

Rating component is used to display a star rating with average value and number of reviews/ratings for a product.

Link copied to clipboard
fun rememberSheetState(initialValue: SheetValue, animationSpec: AnimationSpec<Float> = SwipeableDefaults.AnimationSpec, confirmStateChange: (SheetValue) -> Boolean = { true }): SheetState

Create a SheetState and remember it.

Link copied to clipboard
fun <T> SegmentedControl(textItems: List<SegmentedControlItem.Text<T>>, selectedKey: T, modifier: Modifier = Modifier, style: SegmentedControlStyle = SegmentedControlStyle.Regular, size: SegmentedControlTextItemSize = SegmentedControlTextItemSize.Medium, enabled: Boolean = true, onSelect: (T) -> Unit)
fun <T> SegmentedControl(iconItems: List<SegmentedControlItem.Icon<T>>, selectedKey: T, modifier: Modifier = Modifier, style: SegmentedControlStyle = SegmentedControlStyle.Regular, size: SegmentedControlIconItemSize = SegmentedControlIconItemSize.Medium, isFluid: Boolean = true, enabled: Boolean = true, onSelect: (T) -> Unit)

Allow users to switch between two or more visualisation modes without changing content. They're a great way to add some customisation to an experience.

Link copied to clipboard
fun <T> Select(placeholder: String, label: String, value: String?, selectItemsParams: SelectItemsParams<T>, selectInteractionParams: SelectInteractionParams, expanded: Boolean, modifier: Modifier = Modifier, @DrawableRes iconId: Int? = null, helperText: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, state: BaseField.State = BaseField.State.Default)
fun <T> Select(hint: String, label: String, selectItemsParams: SelectItemsParams<T>, expanded: Boolean, onClick: (Boolean) -> Unit, onClickContentDescription: String?, modifier: Modifier = Modifier, @DrawableRes iconId: Int? = null, helperText: String? = null, enabled: Boolean = true, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, state: BaseField.State = BaseField.State.Default)

Select enables users to display and choose an option within a set of given SelectItemsParams.items that are display as specified in SelectItemsParams.itemContent function. Whenever the user select an option, SelectItemsParams.onItemSelected is called with the selected item as parameter.

Link copied to clipboard
fun <T> ShoppableImage(imageParams: ShoppableImageBackgroundParams, products: List<ShoppableImageItem<T>>, modifier: Modifier = Modifier, selectedProduct: T? = null, showDots: Boolean = true, shopAllButtonParams: ShopAllButtonParams? = null, failedProductsCallback: (List<Pair<ShoppableImageItem<T>, FailReason>>) -> Unit? = null, onSelected: (T?) -> Unit)

Shoppable image is an image with markers that showcases and links to IKEA products pictured within.

Link copied to clipboard
fun Skeleton(modifier: Modifier = Modifier, loading: Boolean = true)

Skeleton is a visual component for content being loaded which create the impression of faster, gradual loading.

Link copied to clipboard
fun Status(variant: StatusVariant, modifier: Modifier = Modifier, size: StatusSize = StatusSize.Proportional)
fun Status(label: String, variant: StatusVariant, modifier: Modifier = Modifier, indicatorPosition: StatusPosition = StatusPosition.Leading, fontSize: TextUnit = StatusProps.DefaultTextSize, size: StatusSize = StatusSize.Proportional)

Status is typically used to highlight product availability but might work in other applications.

Link copied to clipboard
fun Switch(checked: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: SwitchVariant = SwitchVariant.Emphasised, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onCheckedChange: (Boolean) -> Unit?)
fun Switch(label: String, checked: Boolean, modifier: Modifier = Modifier, enabled: Boolean = true, variant: SwitchVariant = SwitchVariant.Emphasised, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onCheckedChange: (Boolean) -> Unit?)

Switch is a binary control for turning a setting or feature 'on' or 'off' with immediate effect.

Link copied to clipboard
fun Tabs(tabList: List<TabItem>, selectedTabIndex: Int, modifier: Modifier = Modifier, fluid: Boolean = false, shadowColor: Color = SkapaTheme.colors.neutral1, variant: TabVariant = TabVariant.Emphasised, onItemSelected: (Int) -> Unit)

Tabs Groups and allows navigation between groups of related content at the same level of the hierarchy, without leaving the page. Tabs can be used on full page layouts or nested in components.

Link copied to clipboard
fun Tag(label: String, modifier: Modifier = Modifier, color: TagColor = TagColor.Default, iconResource: Int? = null, counter: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: () -> Unit? = null)

Tag is used to classify and link to content.

Link copied to clipboard
Link copied to clipboard
fun TextArea(value: String, onChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, helperTextParams: HelperTextParams = HelperTextParams.None, characterCounterParams: CharacterCounterParams = CharacterCounterParams.None, enabledState: EnabledState = EnabledState.Enabled, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(autoCorrectEnabled = false), keyboardActions: KeyboardActions = KeyboardActions.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })
fun TextArea(value: String, onChange: (String) -> Unit, label: String, modifier: Modifier = Modifier, helperText: String? = null, @IntRange(from = 0, to = 9223372036854775807) characterLimit: Int = BaseInputFieldProps.DefaultMinCharLimit, accessibilityCharacterLimitMessage: String?, enabled: Boolean = true, visualTransformation: VisualTransformation = VisualTransformation.None, keyboardOptions: KeyboardOptions = KeyboardOptions.Default.copy(autoCorrectEnabled = false), keyboardActions: KeyboardActions = KeyboardActions.Default, state: BaseField.State = BaseField.State.Default, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() })

Text area enables users to edit Multi-line text via hardware or software keyboard, providing different decorations such as Label, helper text, and counter. Whenever the user edits the text, onChange is called with the most up to date state represented by value. value contains the text entered by user. fields, useful when you want to allow users to enter a sizeable amount of text.

Link copied to clipboard
fun Toast(message: String, modifier: Modifier = Modifier, dismissParams: DismissParams, actionLabel: String? = null, actionOnClick: () -> Unit? = null)

Toast component displays a brief, non-interruptive message that floats in front of the screen. It is built to be used in conjunction with Scaffold and SnackbarHost in the same manner as Material Design Snackbar, using snackbarData for input. Comes with predefined appearance based on Skapa design and guidelines.

Link copied to clipboard

Converting Helper text states to Base field states

Link copied to clipboard
@JvmName(name = "ToggleWithIcon")
fun Toggle(toggleOptions: List<ToggleItem.Icon>, modifier: Modifier = Modifier, selectedIndex: Int = 0, fluidState: Boolean = false, onSelect: (index: Int) -> Unit)
@JvmName(name = "ToggleWithLabel")
fun Toggle(toggleOptions: List<ToggleItem.Text>, modifier: Modifier = Modifier, selectedIndex: Int = 0, fluidState: Boolean = false, onSelect: (index: Int) -> Unit)

Toggle component is a control that allows a single selection of a list of mutually exclusive options. The component comes with a predefined appearance based on Skapa design and guidelines.

Link copied to clipboard

Converting Base field states to Helper text states

Link copied to clipboard
fun TriStateCheckbox(toggleState: ToggleableState, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (ToggleableState) -> Unit?)
fun TriStateCheckbox(label: String, toggleState: ToggleableState, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, error: Boolean = false, helperText: String? = null, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (ToggleableState) -> Unit?)
fun TriStateCheckbox(label: String, toggleState: ToggleableState, modifier: Modifier = Modifier, enabled: Boolean = true, variant: CheckboxVariant = CheckboxVariant.Subtle, caption: String? = null, helperTextErrorLabel: String?, interactionSource: MutableInteractionSource = remember { MutableInteractionSource() }, onClick: (ToggleableState) -> Unit?)

TriStateCheckbox should be used when selections can contain sub-selections.