m3e/swipe_reveal_group

SwipeRevealGroup is coordinates a set of m3e-swipe-reveal elements.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    dismissible: swipe_reveal_dismiss.SwipeRevealDismiss,
    dismiss_threshold: Float,
    elastic: swipe_reveal_elastic.SwipeRevealElastic,
    overshoot: Float,
    stagger: Float,
    stagger_count: Float,
    threshold: Float,
    triggers: List(swipe_reveal_trigger.SwipeRevealTrigger),
  )
}

Constructors

SwipeRevealGroup is a View Model for this component

Fields:

  • dismissible: The sides whose swipe can continue past the actions to dismiss the item.
  • dismiss_threshold: The fraction (0 to 1) of the item’s width it must be dragged to dismiss it on release.
  • elastic: The sides whose actions squish and grow as content is dragged.
  • overshoot: The maximum distance (px) content can be dragged past fully revealing its actions. Buttons grow with the overshoot. Set to 0 to disable.
  • stagger: How far (0 to 1) a nearest sibling follows a dragged item. Each further sibling follows by half as much as the previous. A value of 0 disables staggering.
  • stagger_count: The maximum number of siblings, on each side, to stagger.
  • threshold: The fraction (0 to 1) of an actions’ width content must be dragged to reveal. Closing a revealed item uses the same fraction in reverse.
  • triggers: The gestures used to reveal actions.
pub opaque type SwipeRevealGroup

Values

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_dismiss_threshold: Float
pub const default_overshoot: Float
pub const default_stagger: Float
pub const default_stagger_count: Float
pub const default_threshold: Float
pub fn dismiss_threshold(
  record: SwipeRevealGroup,
  dismiss_threshold: Float,
) -> SwipeRevealGroup

dismiss_threshold sets the value of dismiss_threshold for this SwipeRevealGroup.

pub fn dismissible(
  record: SwipeRevealGroup,
  dismissible: swipe_reveal_dismiss.SwipeRevealDismiss,
) -> SwipeRevealGroup

dismissible sets the value of dismissible for this SwipeRevealGroup.

pub fn elastic(
  record: SwipeRevealGroup,
  elastic: swipe_reveal_elastic.SwipeRevealElastic,
) -> SwipeRevealGroup

elastic sets the value of elastic for this SwipeRevealGroup.

pub fn from_config(config: Config) -> SwipeRevealGroup

from_config creates a new SwipeRevealGroup from the given configuration.

pub fn new() -> SwipeRevealGroup

new creates a new SwipeRevealGroup with the default configuration.

pub fn overshoot(
  record: SwipeRevealGroup,
  overshoot: Float,
) -> SwipeRevealGroup

overshoot sets the value of overshoot for this SwipeRevealGroup.

pub fn render(
  model: SwipeRevealGroup,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a SwipeRevealGroup

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a SwipeRevealGroup Config

pub fn stagger(
  record: SwipeRevealGroup,
  stagger: Float,
) -> SwipeRevealGroup

stagger sets the value of stagger for this SwipeRevealGroup.

pub fn stagger_count(
  record: SwipeRevealGroup,
  stagger_count: Float,
) -> SwipeRevealGroup

stagger_count sets the value of stagger_count for this SwipeRevealGroup.

pub fn threshold(
  record: SwipeRevealGroup,
  threshold: Float,
) -> SwipeRevealGroup

threshold sets the value of threshold for this SwipeRevealGroup.

pub fn triggers(
  record: SwipeRevealGroup,
  triggers: List(swipe_reveal_trigger.SwipeRevealTrigger),
) -> SwipeRevealGroup

triggers sets the value of triggers for this SwipeRevealGroup.

✨ Search Document