# m3e/card

Card is a content container for text, images (or other media), and actions in the context of a single subject.

This file was generated: By: m3e/generator version 0.1.0 At: 2026-05-05T14:38:23+10:00

         DO NOT EDIT

# Types

## Actionable

</>

Actionable is whether the card is “actionable” and will respond to use interaction.

    pub type Actionable {
      IsActionable
      IsNotActionable
    }

### Constructors

-     IsActionable

-     IsNotActionable

## Card

opaque </>

Card is a View Model for this component

## Fields:

- actionable: Whether the card is “actionable” and will respond to use interaction.
- inline: Whether to present the card inline with surrounding content.
- orientation: The orientation of the card.
- variant: The appearance variant of the card.
- href: The URL to which the link button points.
- target: The target of the link button.
- rel: The relationship between the `target` of the link button and the document.
- download: A value indicating whether the `target` of the link button will be downloaded, optionally specifying the new name of the file.
- name: The name of the element, submitted as a pair with the element’s `value` as part of form data, when the element is used to submit a form.
- value: The value associated with the element’s name when it’s submitted with form data.
- type_: The type of the element.
- disabled_interactive: Whether the element is disabled and interactive.
- disabled: Whether the element is disabled.

    pub opaque type Card

## Config

</>

Config is a public record for configuring this component.

    pub type Config {
      Config(
        actionable: Actionable,
        inline: Inline,
        orientation: card_orientation.CardOrientation,
        variant: card_variant.CardVariant,
        href: String,
        target: option.Option(link_target.LinkTarget),
        rel: String,
        download: option.Option(String),
        name: String,
        value: String,
        type_: form_submitter_type.FormSubmitterType,
        disabled_interactive: DisabledInteractive,
        disabled: Disabled,
      )
    }

### Constructors

-     Config(
        actionable: Actionable,
        inline: Inline,
        orientation: card_orientation.CardOrientation,
        variant: card_variant.CardVariant,
        href: String,
        target: option.Option(link_target.LinkTarget),
        rel: String,
        download: option.Option(String),
        name: String,
        value: String,
        type_: form_submitter_type.FormSubmitterType,
        disabled_interactive: DisabledInteractive,
        disabled: Disabled,
      )

## Disabled

</>

Disabled is whether the element is disabled.

    pub type Disabled {
      IsDisabled
      IsNotDisabled
    }

### Constructors

-     IsDisabled

-     IsNotDisabled

## DisabledInteractive

</>

DisabledInteractive is whether the element is disabled and interactive.

    pub type DisabledInteractive {
      IsDisabledInteractive
      IsNotDisabledInteractive
    }

### Constructors

-     IsDisabledInteractive

-     IsNotDisabledInteractive

## Inline

</>

Inline is whether to present the card inline with surrounding content.

    pub type Inline {
      IsInline
      IsNotInline
    }

### Constructors

-     IsInline

-     IsNotInline

## Slot

</>

Slots are used in child elements to insert content into this component

    pub type Slot {
      Header
      Content
      Actions
      Footer
    }

### Constructors

-     Header

-     Content

-     Actions

-     Footer

# Values

## actionable

</>

    pub fn actionable(record: Card, actionable: Actionable) -> Card

actionable sets the value of actionable for this Card.

## default_actionable

</>

    pub const default_actionable: Actionable

## default_config

</>

    pub fn default_config() -> Config

default_config is the default configuration for this component.

## default_disabled

</>

    pub const default_disabled: Disabled

## default_disabled_interactive

</>

    pub const default_disabled_interactive: DisabledInteractive

## default_download

</>

    pub const default_download: option.Option(String)

## default_href

</>

    pub const default_href: String

## default_inline

</>

    pub const default_inline: Inline

## default_name

</>

    pub const default_name: String

## default_orientation

</>

    pub const default_orientation: card_orientation.CardOrientation

## default_rel

</>

    pub const default_rel: String

## default_target

</>

    pub const default_target: option.Option(link_target.LinkTarget)

## default_type_

</>

    pub const default_type_: form_submitter_type.FormSubmitterType

## default_value

</>

    pub const default_value: String

## default_variant

</>

    pub const default_variant: card_variant.CardVariant

## disabled

</>

    pub fn disabled(record: Card, disabled: Disabled) -> Card

disabled sets the value of disabled for this Card.

## disabled_interactive

</>

    pub fn disabled_interactive(
      record: Card,
      disabled_interactive: DisabledInteractive,
    ) -> Card

disabled_interactive sets the value of disabled_interactive for this Card.

## download

</>

    pub fn download(
      record: Card,
      download: option.Option(String),
    ) -> Card

download sets the value of download for this Card.

## from_config

</>

    pub fn from_config(config: Config) -> Card

from_config creates a new Card from the given configuration.

## href

</>

    pub fn href(record: Card, href: String) -> Card

href sets the value of href for this Card.

## inline

</>

    pub fn inline(record: Card, inline: Inline) -> Card

inline sets the value of inline for this Card.

## name

</>

    pub fn name(record: Card, name: String) -> Card

name sets the value of name for this Card.

## new

</>

    pub fn new() -> Card

new creates a new Card with the default configuration.

## orientation

</>

    pub fn orientation(
      record: Card,
      orientation: card_orientation.CardOrientation,
    ) -> Card

orientation sets the value of orientation for this Card.

## rel

</>

    pub fn rel(record: Card, rel: String) -> Card

rel sets the value of rel for this Card.

## render

</>

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

render creates a Lustre Element for a Card

## render_config

</>

    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 Card Config

## slot

</>

    pub fn slot(s: Slot) -> attribute.Attribute(msg)

slot returns a Lustre Attribute(msg) for the given slot name

## target

</>

    pub fn target(
      record: Card,
      target: option.Option(link_target.LinkTarget),
    ) -> Card

target sets the value of target for this Card.

## type_

</>

    pub fn type_(
      record: Card,
      type_: form_submitter_type.FormSubmitterType,
    ) -> Card

type_ sets the value of type_ for this Card.

## value

</>

    pub fn value(record: Card, value: String) -> Card

value sets the value of value for this Card.

## variant

</>

    pub fn variant(
      record: Card,
      variant: card_variant.CardVariant,
    ) -> Card

variant sets the value of variant for this Card.

✨