uiDisplay

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 12 Imported by: 0

README

Display

The display package shows content, state, and page chrome. Part of Infinite UI.

Accordion

Collapsible sections built on <details> and <summary>.

@uiDisplay.Accordion(uiDisplay.AccordionSettings{
    Items: []uiDisplay.AccordionItemSettings{
        {Title: "Section 1", Content: AccordionDemoSection1(), Icon: "ph-info"},
        {Title: "Section 2", Content: AccordionDemoSection2()},
    },
})
  • Each item takes a Title, a Content component, and an optional Icon.
  • BorderRadius rounds only the outer corners: the top of the first item and the bottom of the last item.
  • ContentBackgroundColor sets the color behind open content (default neutral-900). Use the color of the surface that holds the accordion. The content then shows as a cutout of that surface.
  • IsSingleOpen keeps one item open. The items share one name, so an open item closes the others.
  • IsFirstItemOpen opens the first item at render.
  • TextCase takes a uiToolset.TextCase* value for the titles.

Alert

A status message with a title, a description, and a variation.

@uiDisplay.Alert(uiDisplay.AlertSettings{
    Title:       "Alert Title",
    Description: "This is an alert message.",
    Variation:   uiDisplay.AlertVariationInfo,
    Size:        uiDisplay.AlertSizeMd,
    IsCloseable: true,
})
  • Variation takes AlertVariationSuccess, AlertVariationWarning, AlertVariationError, or AlertVariationInfo.
  • ContentHtml replaces the title and the description with custom markup.
  • Title and Description render as raw HTML. Give them only trusted content, never request data.
  • IsCloseable shows a close button. DisplayTimeoutSeconds and OnTimeoutFunc close the alert after a delay.
  • The *OneWayStatePath fields bind the title and the description to Alpine state.

Chart

Line, area, bar, and donut charts drawn with Vega. The chart reads the global vega and does not load it. Load Vega once per page, usually with @uiImport.HeadTagsVega() in the layout head. Without Vega, the chart shows the legend and the table and logs ChartVegaLibraryNotLoaded.

@uiDisplay.Chart(uiDisplay.ChartSettings{
    Type: uiDisplay.ChartTypeArea,
    XAxis: uiDisplay.ChartXAxisSettings{
        RowKey:    "time",
        ScaleType: uiDisplay.ChartScaleTypeTime,
    },
    Series: []uiDisplay.ChartSeriesSettings{
        {RowKey: "cpu", Label: "CPU"},
        {RowKey: "memory", Label: "Memory", IdentityColor: "sky-400"},
    },

    // OptionalFields
    Cartesian: uiDisplay.ChartCartesianSettings{
        YAxis: uiDisplay.ChartYAxisSettings{
            TickLabelFormat: ".0%",
            MinValue:        "0",
            MaxValue:        "1",
        },
    },
    RowsOneWayStatePath: "resourceUsageRows",
    MaxRows:             20,
})

An unknown option value, a missing RowKey, or a bound that is not a number stops the render with an error.

Rows
  • A row is one object. XAxis.RowKey names the key with the X value. Each series RowKey names the key with that series value. Example: {time: 1760360000000, cpu: 0.42, memory: 0.61}.
  • Rows sets the initial rows from Go. Any value that encodes to a JSON array of objects works.
  • RowsOneWayStatePath binds the rows to Alpine state. The chart draws again when the array or a row changes.
  • MaxRows keeps only the newest rows. 0 keeps every row.
Type and marks
  • Type takes ChartTypeLine (the default), ChartTypeArea, ChartTypeBar, or ChartTypeDonut.
  • A line, area, or bar chart reads Cartesian. A donut reads Donut.
  • Cartesian.StackMode takes ChartStackModeNone (the default), ChartStackModeStacked, or ChartStackModePercent. A stacked chart piles the series. A percent chart shows each series as a share of the total, and the Y axis format changes to ".0%". Without a stack, a bar chart puts the series side by side.
  • Cartesian.AreaFillStyle takes ChartAreaFillStyleGradient (the default), ChartAreaFillStyleSolid, or ChartAreaFillStyleNone.
  • Cartesian.MarkerDisplayMode takes ChartMarkerDisplayModeHover (the default), ChartMarkerDisplayModeAlways, or ChartMarkerDisplayModeHidden.
  • A donut reads the first series. XAxis.RowKey names each slice. Donut.HolePercent sets the hole size (default 60, maximum 90).
  • Donut.CenterLabelDisplayMode shows the slice name and its value in the hole. It takes ChartDonutCenterLabelDisplayModeHidden (the default), ChartDonutCenterLabelDisplayModeHover, or ChartDonutCenterLabelDisplayModeAlways. Always keeps the at-rest slice. A hover replaces it. Hover mode shows the label only while a slice is hovered.
  • Donut.CenterLabelAlwaysSlice names the at-rest slice. An empty value shows the first slice. An unknown name logs ChartDonutCenterLabelSliceNotFound and shows the first slice. Donut.CenterLabelSliceColor and Donut.CenterLabelValueColor set the two label colors. The value takes Tooltip.ValueFormat.
  • Donut.CenterLabelSize takes ChartDonutCenterLabelSizeXs through ChartDonutCenterLabelSizeXl (default Md). It scales both label lines together. Donut.CenterLabelValueSuffix follows the center label value only, for example " GiB". The tooltip keeps its own value.
  • GapColor sets the color of the gaps between bars, slices, and markers (default neutral-900). Match it to the background behind the chart.
Colors
  • Every color field takes a Tailwind color token, for example "sky-400", "red-500/20", or "[#4c8dff]". The chart reads the real color from a hidden element with that class.
  • IdentityColor is the one color of a series. The line, the area, the bar, the marker, the legend swatch, and the tooltip swatch all use it, so the legend always matches the plot.
  • Without IdentityColor, each series gets the next color of a fixed palette of eight. The palette passes color-vision checks on the dark surface. A ninth series shows gray and logs ChartSeriesPaletteExceeded, so group extra series.
  • Donut.SliceIdentityColors maps a slice name to a token. Other slices use the palette.
  • A token that the page cannot resolve logs ChartColorTokenUnresolved.
Series
  • RowKey is required. An empty Label shows the RowKey.
  • LineDashStyle takes ChartLineDashStyleSolid (the default), ChartLineDashStyleDashed, or ChartLineDashStyleDotted.
Axes
  • XAxis.ScaleType takes ChartScaleTypeCategory (the default), ChartScaleTypeTime, or ChartScaleTypeNumber. A category axis keeps the row order. A time axis takes Unix milliseconds or ISO 8601 strings and sorts by time. A number axis sorts by value.
  • TickLabelFormat takes a d3 time format on a time axis and a d3 number format on a number axis. A category axis ignores it and shows the row values as they are. The Y default is ",.2~f".
  • Title shows a title on the axis. XAxis.Title also names the first column of the screen-reader table.
  • TitleColor, TickLabelColor, BaselineColor, and GridLineColor set the axis colors.
  • IsHidden hides the labels, the ticks, and the baseline. The grid stays.
  • XAxis.IsTickStartEndOnly shows only the first and the last X label.
  • XAxis.IsGridLineVisible shows the X grid, which is off by default. YAxis.IsGridLineHidden hides the Y grid.
  • YAxis.MinValue and YAxis.MaxValue fix the value range. Empty values fit the data.
  • YAxis.TickCount sets the number of Y labels (default 5). YAxis.Position takes ChartYAxisPositionLeft (the default) or ChartYAxisPositionRight.
Legend
  • DisplayMode takes ChartLegendDisplayModeAuto (the default, two or more entries), ChartLegendDisplayModeAlways, or ChartLegendDisplayModeHidden.
  • Position takes ChartLegendPositionTop (the default) or ChartLegendPositionBottom.
  • Alignment takes ChartLegendAlignmentStart (the default), ChartLegendAlignmentCenter, or ChartLegendAlignmentEnd.
  • SwatchShape takes a uiToolset.Shape* constant (default circular). TextColor and GapSize style the entries.
Tooltip
  • On a line or area chart, hover shows a crosshair and each series value at that point. A bar or a slice shows its own value.
  • TitleFormat formats the X value. A time axis defaults to "%b %d, %H:%M:%S". A category axis ignores it and shows the row value as it is. ValueFormat formats the series values. It defaults to the Y tick label format, and to ",.2~f" on a percent stack.
  • ContentFunc names a global JavaScript function that returns the tooltip HTML for the hovered row. It receives the row object and replaces the default title and rows. A name that is not a function logs ChartTooltipContentFuncMissing and falls back to the default.
  • BackgroundColor, TitleColor, SeriesLabelColor, and ValueColor set the colors. RingColor, RingThickness, ShadowSize, PaddingSize, BorderRadius, MinWidthClass, and MaxWidthClass style the surface.
  • CrosshairColor sets the crosshair color. IsCrosshairHidden hides it. IsHidden hides the tooltip.
Layout and accessibility
  • HeightClass sets the plot height (default h-64).
  • EmptyState takes a component that shows over the plot when there are no rows. The default is the text No data.
  • AriaLabel names the plot and the screen-reader table of rows. Without it, the series labels name the plot.

CloakLoading

A full-screen loader that covers the page until CSS and JavaScript load. Put it first in <body>.

@uiDisplay.CloakLoading(uiDisplay.CloakLoadingSettings{
    HideDelaySeconds: "1",
    TextMessage:      "Loading...",
    Icon:             "ph-compass-rose",
})
  • It uses inline styles, so it renders before the stylesheet loads.
  • It hides HideDelaySeconds after Alpine starts.
  • The icon size takes a CloakLoadingIconSize* constant. The animation takes a CloakLoadingAnimationName* constant.

ConfirmationDialog and Presets

Confirmation dialogs built on Modal. Four presets set the icon, tone, and text: ConfirmDialog, WarningDialog, CriticalDialog, and DeleteDialog. CriticalDialog and DeleteDialog ask the user to type the target name and have no fullscreen mode.

@uiDisplay.DeleteDialog(uiDisplay.ConfirmationDialogSettings{
    IsVisibleTwoWayStatePath: "isDeleteDialogVisible",
    OnConfirmFunc:            "deleteRecord()",

    // OptionalFields
    TargetNameStatePath: "record.name",
    TargetIdStatePath:   "record.id",
})
  • Size takes ConfirmationDialogSizeXs (40%) through ConfirmationDialogSizeXxl (90%), as viewport percentages on both axes. The default is ConfirmationDialogSizeSm (50%). The dialog has no fullscreen size and no resize control.
  • WidthPercent and HeightPercent replace the box, as in Modal. Without HeightPercent, the height fits the content up to 85%.
  • The header takes HeaderTitle, HeaderSubHeading, their *OneWayStatePath and *Color fields, HeaderSize, TextCase, and the HeaderIcon* fields. Each preset sets the title and icon defaults.
  • HeaderIconPosition defaults to HeaderIconPositionTop, with the icon above the title. HeaderIconPositionLeft puts it beside the title.
  • ActionsContent adds buttons next to the close button. HeaderContent replaces the header. TextColor sets the text color.
  • TargetNameStatePath and TargetIdStatePath put live values in the message. The name shows as a dashed chip and the id as #<id>.
  • IsTypeToConfirmEnabled turns on the typed check. The confirm button enables only when the typed text matches the target name, or the id when no name path is set. An empty target keeps the button disabled.
  • TypeToConfirmValueTwoWayStatePath keeps the typed text in your Alpine state. By default, the dialog keeps it.
  • Each typed-check dialog keeps its own text, but all use the input name typedConfirmationValue. Do not put two of them in one submitted form.
  • Give the state paths from code, never from request data. The component puts them into client-side expressions.
  • Message replaces the note under the question. MessageContent replaces the full message block.
  • CancelFunc closes the dialog by default. OnConfirmFunc runs as written, so add the close when the action succeeds.
  • The cancel button has an outline. The confirm button has the preset tone fill.
  • HeaderTitle, ConfirmButtonLabel, ConfirmButtonIcon, and CancelButtonLabel replace the preset text.

HeaderBlock

The header row of PageHeading, Card, and ConfirmationDialog: icon, title, sub-heading, and an actions slot on the right.

@uiDisplay.HeaderBlock(uiDisplay.HeaderBlockSettings{
    HeaderTitle: "Network",

    // OptionalFields
    HeaderSubHeading:   "Interfaces and routes",
    HeaderIcon:         "ph-globe",
    HeaderIconPosition: uiDisplay.HeaderIconPositionLeft,
    HeadingLevel:       uiDisplay.HeaderBlockHeadingLevelTwo,
})
  • HeadingLevel takes HeaderBlockHeadingLevelOne or HeaderBlockHeadingLevelTwo (the default).
  • HeaderSize takes HeaderSizeXs through HeaderSizeXl. It scales the title, the icon, and the sub-heading.
  • The HeaderIcon* fields match the HeaderIcon settings. HeaderIconPosition takes HeaderIconPositionLeft or HeaderIconPositionTop.
  • HeaderTitleColor, HeaderSubHeadingColor, and TextColor take color tokens.
  • TextCase takes a uiToolset.TextCase* value for the title and the sub-heading. Card, PageHeading, and ConfirmationDialog pass it on.

HeaderIcon

An icon with an optional background chip.

@uiDisplay.HeaderIcon(uiDisplay.HeaderIconSettings{
    Name: "ph-cube",

    // OptionalFields
    Color:           "red-950",
    BackgroundColor: "neutral-300",
    BorderRadius:    uiToolset.BorderRadiusXl,
    PaddingSize:     uiToolset.PaddingSizeLg,
})
  • Color sets the icon color. BackgroundColor sets the chip color.
  • HeaderBlock places the icon through HeaderIconPosition.
  • BorderRadius takes uiToolset.BorderRadiusNone through uiToolset.BorderRadiusFull. PaddingSize takes uiToolset.PaddingSizeNone through uiToolset.PaddingSizeXl.

LoadingOverlay

An overlay for requests in progress. It binds to a state path or follows the HTMX htmx-request class.

@uiDisplay.LoadingOverlay(uiDisplay.LoadingOverlaySettings{
    IsLoadingOneWayStatePath: "isLoading",
    Icon:                     "ph-compass-rose",
    IconSize:                 uiDisplay.LoadingOverlayIconSizeMd,
    AnimationName:            uiDisplay.LoadingOverlayAnimationNameSpin,
})

Set hx-indicator="#loading-overlay" on HTMX elements, or call UiToolset.ToggleLoadingOverlay(). Id gives a second overlay its own id.

Modal

A window dialog with header, middle, and footer slots.

@uiDisplay.Modal(uiDisplay.ModalSettings{
    MiddleContent:            ModalDemoContent(),
    Title:                    "Modal Title",
    InitialSize:              uiDisplay.ModalSizeMd,
    IsVisibleTwoWayStatePath: "isModalVisible",
})
  • The standard header shows when Title is set and HeaderContent is nil. It has the enlarge, reduce, and close buttons. A custom HeaderContent keeps the same buttons beside it.
  • InitialSize sets the panel as a viewport percentage on both axes: ModalSizeXs (40%), ModalSizeSm (50%), ModalSizeMd (60%), ModalSizeLg (70%), ModalSizeXl (80%), ModalSizeXxl (90%), and ModalSizeFull (100%). The panel follows the screen shape. It also scales the header title and padding.
  • WidthPercent and HeightPercent replace one axis with a whole percentage from 1 to 100. With both set, the resize buttons do not show.
  • MinWidthPercent, MaxWidthPercent, MinHeightPercent, and MaxHeightPercent set limits on each axis. The panel keeps its size inside these limits.
  • PossibleSizes lists the sizes in order (default md, lg, xl, xxl). The list starts at InitialSize. An InitialSize outside the list falls to the first entry.
  • CurrentSizeTwoWayStatePath binds the live size. When the field is empty and the panel can resize, the modal makes its own path.
  • Enlarge moves one size up, and reduce moves one size down. Reduce hides at the initial size, and enlarge hides at the largest size.
  • ShouldHeightMatchContent sets the height to the content, up to 85%.
  • IsMiddleContentScrollDisabled stops the middle scroll, so the content controls its overflow. Use it for a full-bleed panel such as a terminal.
  • IsUnresizable and IsUncloseable remove those buttons. The resize buttons also hide when fewer than two sizes are available.
  • The close button and a backdrop click set the visibility path to false and run OnCloseFunc. IsUncloseable stops both, so the app must close the modal.
  • OnResizeFunc runs on each resize click.

Tag

A label with an outer ring and an inner background.

@uiDisplay.Tag(uiDisplay.TagSettings{
    OuterLeftIcon:  "ph-info",
    OuterLeftLabel: "Info",
    InnerIcon:      "ph-warning",
    InnerLabel:     "Warning",
    Size:           uiDisplay.TagSizeXs,
})
  • The OuterLeft*, OuterRight*, and Inner* fields take an icon, a static label, or a *OneWayStatePath for live text.
  • InnerValueOneWayStatePath binds a live value without the lowercase change. Use it with a static OuterLeftLabel for a label-value tag.
  • Size takes TagSizeTiny through TagSizeXl. TagSizeTiny fits table cells.
  • TextCase takes a uiToolset.TextCase* value for the labels.
  • OnRemoveFunc adds a remove button. RemoveButtonLabel names it.
  • OuterRadius and InnerRadius take uiToolset.BorderRadius* values (default uiToolset.BorderRadiusMd).
  • OuterBackgroundColor, OuterRingColor, and OuterTextColor take color tokens, for example "neutral-50/10".

Toast

A notification popup that an Alpine store controls.

@uiDisplay.Toast(uiDisplay.ToastSettings{
    TextColor:          "neutral-50",
    Size:               uiDisplay.ToastSizeMd,
    AutoDismissSeconds: 10,
})
  • Render one Toast per page.
  • Call $store.toast.displayToast(message, type) or $store.toast.displayToastWithApiResponse(apiResponse, httpStatusCode). Call $store.toast.clearToast() to hide it.
  • The background defaults to neutral-800/90. The ring defaults to ring-2 in the tone color: green for success, yellow for partialSuccess, and red for danger. BackgroundColor, RingColor, and RingThickness change them.
  • With HTMX on the page, the Toast listens to htmx:afterRequest. A JSON response with a readableMessage, a humanReadableMessage outcome, or a string body shows a toast. The HTTP status sets the tone: 2xx success, 207 partial success, 4xx and higher danger.
  • The toast closes after 10 seconds by default.

Documentation

Overview

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

templ: version: v0.3.1070

Index

Constants

View Source
const (
	AlertVariationSuccess string = "success"
	AlertVariationWarning string = "warning"
	AlertVariationError   string = "error"
	AlertVariationInfo    string = "info"

	AlertSizeXs string = "xs"
	AlertSizeSm string = "sm"
	AlertSizeMd string = "md"
	AlertSizeLg string = "lg"
	AlertSizeXl string = "xl"
)
View Source
const (
	CloakLoadingIconSizeXs string = "2rem"
	CloakLoadingIconSizeSm string = "3rem"
	CloakLoadingIconSizeMd string = "5rem"
	CloakLoadingIconSizeLg string = "7rem"

	CloakLoadingTextSizeXs string = "0.75rem"
	CloakLoadingTextSizeSm string = "1rem"
	CloakLoadingTextSizeMd string = "1.25rem"
	CloakLoadingTextSizeLg string = "1.5rem"

	CloakLoadingAnimationNameBounce string = "bounce"
	CloakLoadingAnimationNamePing   string = "ping"
	CloakLoadingAnimationNamePulse  string = "pulse"
	CloakLoadingAnimationNameSpin   string = "spin"
)
View Source
const (
	ConfirmationDialogSizeXs  string = "xs"
	ConfirmationDialogSizeSm  string = "sm"
	ConfirmationDialogSizeMd  string = "md"
	ConfirmationDialogSizeLg  string = "lg"
	ConfirmationDialogSizeXl  string = "xl"
	ConfirmationDialogSizeXxl string = "xxl"
)
View Source
const (
	HeaderBlockHeadingLevelOne string = "1"
	HeaderBlockHeadingLevelTwo string = "2"

	HeaderSizeXs string = "xs"
	HeaderSizeSm string = "sm"
	HeaderSizeMd string = "md"
	HeaderSizeLg string = "lg"
	HeaderSizeXl string = "xl"
)
View Source
const (
	HeaderIconPositionLeft string = "left"
	HeaderIconPositionTop  string = "top"
)
View Source
const (
	LoadingOverlayIconSizeXs string = "text-2xl"
	LoadingOverlayIconSizeSm string = "text-3xl"
	LoadingOverlayIconSizeMd string = "text-5xl"
	LoadingOverlayIconSizeLg string = "text-7xl"

	LoadingOverlayAnimationNameBounce string = "bounce"
	LoadingOverlayAnimationNamePing   string = "ping"
	LoadingOverlayAnimationNamePulse  string = "pulse"
	LoadingOverlayAnimationNameSpin   string = "spin"
)
View Source
const (
	ModalSizeXs   string = "xs"
	ModalSizeSm   string = "sm"
	ModalSizeMd   string = "md"
	ModalSizeLg   string = "lg"
	ModalSizeXl   string = "xl"
	ModalSizeXxl  string = "xxl"
	ModalSizeFull string = "full"
)
View Source
const (
	TagSizeTiny string = "tiny"
	TagSizeXs   string = "xs"
	TagSizeSm   string = "sm"
	TagSizeMd   string = "md"
	TagSizeLg   string = "lg"
	TagSizeXl   string = "xl"
)
View Source
const (
	ToastSizeXs string = "xs"
	ToastSizeSm string = "sm"
	ToastSizeMd string = "md"
	ToastSizeLg string = "lg"

	ToastAutoDismissSecondsDefault int = 10
)

Variables

This section is empty.

Functions

func Accordion

func Accordion(componentSettings AccordionSettings) templ.Component

func Alert added in v0.1.4

func Alert(componentSettings AlertSettings) templ.Component

func Chart added in v0.2.9

func Chart(componentSettings ChartSettings) templ.Component

func CloakLoading added in v0.0.8

func CloakLoading(componentSettings CloakLoadingSettings) templ.Component

func ConfirmDialog added in v0.2.2

func ConfirmDialog(componentSettings ConfirmationDialogSettings) templ.Component

func CriticalDialog added in v0.2.2

func CriticalDialog(componentSettings ConfirmationDialogSettings) templ.Component

func DeleteDialog added in v0.2.2

func DeleteDialog(componentSettings ConfirmationDialogSettings) templ.Component

func HeaderBlock added in v0.2.2

func HeaderBlock(componentSettings HeaderBlockSettings) templ.Component

func HeaderIcon added in v0.2.2

func HeaderIcon(componentSettings HeaderIconSettings) templ.Component

func LoadingOverlay added in v0.0.6

func LoadingOverlay(componentSettings LoadingOverlaySettings) templ.Component
func Modal(componentSettings ModalSettings) templ.Component

func Tag

func Tag(componentSettings TagSettings) templ.Component

func Toast added in v0.0.5

func Toast(componentSettings ToastSettings) templ.Component

func WarningDialog added in v0.2.2

func WarningDialog(componentSettings ConfirmationDialogSettings) templ.Component

Types

type AccordionItemSettings

type AccordionItemSettings struct {
	Title   string
	Content templ.Component

	// OptionalFields
	Icon string
}

type AccordionSettings

type AccordionSettings struct {
	Items []AccordionItemSettings

	// OptionalFields
	BackgroundColor        string
	BorderColor            string
	BorderRadius           string
	ContentBackgroundColor string
	ContentPaddingSize     string
	IsFirstItemOpen        bool
	IsSingleOpen           bool
	OpenBackgroundColor    string
	PaddingSize            string
	TextCase               string
	TitleColor             string
}

type AlertSettings added in v0.1.4

type AlertSettings struct {
	// OptionalFields
	ContentHtml                         templ.Component
	Title                               string
	TitleOneWayStatePath                string
	TitleLeftIcon                       string
	TitleLeftIconTwoWayStatePath        string
	TitleRightIcon                      string
	TitleRightIconTwoWayStatePath       string
	Description                         string
	DescriptionOneWayStatePath          string
	DescriptionLeftIcon                 string
	DescriptionLeftIconTwoWayStatePath  string
	DescriptionRightIcon                string
	DescriptionRightIconTwoWayStatePath string
	Variation                           string
	Size                                string
	MaxWidth                            string
	BackgroundColor                     string
	TextColor                           string
	TextTitleColor                      string
	TextDescriptionColor                string
	RingColor                           string
	RingThickness                       string
	BorderRadius                        string
	ShadowSize                          string
	IsCloseable                         bool
	IsCloseableOneWayStatePath          string
	CloseIconBackgroundColor            string
	CloseIconTextColor                  string
	OnCloseFunc                         string
	DisplayTimeoutSeconds               int
	OnTimeoutFunc                       string
}

type ChartAreaFillStyle added in v0.2.9

type ChartAreaFillStyle string
const (
	ChartAreaFillStyleGradient ChartAreaFillStyle = "gradient"
	ChartAreaFillStyleNone     ChartAreaFillStyle = "none"
	ChartAreaFillStyleSolid    ChartAreaFillStyle = "solid"
)

type ChartCartesianSettings added in v0.2.9

type ChartCartesianSettings struct {
	// OptionalFields
	AreaFillStyle     ChartAreaFillStyle
	MarkerDisplayMode ChartMarkerDisplayMode
	StackMode         ChartStackMode
	YAxis             ChartYAxisSettings
}

type ChartDonutCenterLabelDisplayMode added in v0.2.9

type ChartDonutCenterLabelDisplayMode string
const (
	ChartDonutCenterLabelDisplayModeAlways ChartDonutCenterLabelDisplayMode = "always"
	ChartDonutCenterLabelDisplayModeHidden ChartDonutCenterLabelDisplayMode = "hidden"
	ChartDonutCenterLabelDisplayModeHover  ChartDonutCenterLabelDisplayMode = "hover"
)

type ChartDonutCenterLabelSize added in v0.2.9

type ChartDonutCenterLabelSize string
const (
	ChartDonutCenterLabelSizeXs ChartDonutCenterLabelSize = "xs"
	ChartDonutCenterLabelSizeSm ChartDonutCenterLabelSize = "sm"
	ChartDonutCenterLabelSizeMd ChartDonutCenterLabelSize = "md"
	ChartDonutCenterLabelSizeLg ChartDonutCenterLabelSize = "lg"
	ChartDonutCenterLabelSizeXl ChartDonutCenterLabelSize = "xl"
)

type ChartDonutSettings added in v0.2.9

type ChartDonutSettings struct {
	// OptionalFields
	CenterLabelAlwaysSlice string
	CenterLabelDisplayMode ChartDonutCenterLabelDisplayMode
	CenterLabelSize        ChartDonutCenterLabelSize
	CenterLabelSliceColor  string
	CenterLabelValueColor  string
	CenterLabelValueSuffix string
	HolePercent            uint8
	SliceIdentityColors    map[string]string
}

type ChartLegendAlignment added in v0.2.9

type ChartLegendAlignment string
const (
	ChartLegendAlignmentCenter ChartLegendAlignment = "center"
	ChartLegendAlignmentEnd    ChartLegendAlignment = "end"
	ChartLegendAlignmentStart  ChartLegendAlignment = "start"
)

type ChartLegendDisplayMode added in v0.2.9

type ChartLegendDisplayMode string
const (
	ChartLegendDisplayModeAlways ChartLegendDisplayMode = "always"
	ChartLegendDisplayModeAuto   ChartLegendDisplayMode = "auto"
	ChartLegendDisplayModeHidden ChartLegendDisplayMode = "hidden"
)

type ChartLegendPosition added in v0.2.9

type ChartLegendPosition string
const (
	ChartLegendPositionBottom ChartLegendPosition = "bottom"
	ChartLegendPositionTop    ChartLegendPosition = "top"
)

type ChartLegendSettings added in v0.2.9

type ChartLegendSettings struct {
	// OptionalFields
	Alignment   ChartLegendAlignment
	DisplayMode ChartLegendDisplayMode
	GapSize     string
	Position    ChartLegendPosition
	SwatchShape string
	TextColor   string
}

type ChartLineDashStyle added in v0.2.9

type ChartLineDashStyle string
const (
	ChartLineDashStyleDashed ChartLineDashStyle = "dashed"
	ChartLineDashStyleDotted ChartLineDashStyle = "dotted"
	ChartLineDashStyleSolid  ChartLineDashStyle = "solid"
)

type ChartMarkerDisplayMode added in v0.2.9

type ChartMarkerDisplayMode string
const (
	ChartMarkerDisplayModeAlways ChartMarkerDisplayMode = "always"
	ChartMarkerDisplayModeHidden ChartMarkerDisplayMode = "hidden"
	ChartMarkerDisplayModeHover  ChartMarkerDisplayMode = "hover"
)

type ChartScaleType added in v0.2.9

type ChartScaleType string
const (
	ChartScaleTypeCategory ChartScaleType = "category"
	ChartScaleTypeNumber   ChartScaleType = "number"
	ChartScaleTypeTime     ChartScaleType = "time"
)

type ChartSeriesSettings added in v0.2.9

type ChartSeriesSettings struct {
	RowKey string
	Label  string

	// OptionalFields
	IdentityColor string
	LineDashStyle ChartLineDashStyle
}

type ChartSettings added in v0.2.9

type ChartSettings struct {
	Type   ChartType
	XAxis  ChartXAxisSettings
	Series []ChartSeriesSettings

	// OptionalFields
	AriaLabel           string
	Cartesian           ChartCartesianSettings
	Donut               ChartDonutSettings
	EmptyState          templ.Component
	GapColor            string
	HeightClass         string
	Legend              ChartLegendSettings
	MaxRows             uint
	Rows                any
	RowsOneWayStatePath string
	Tooltip             ChartTooltipSettings
}

type ChartStackMode added in v0.2.9

type ChartStackMode string
const (
	ChartStackModeNone    ChartStackMode = "none"
	ChartStackModePercent ChartStackMode = "percent"
	ChartStackModeStacked ChartStackMode = "stacked"
)

type ChartTooltipSettings added in v0.2.9

type ChartTooltipSettings struct {
	// OptionalFields
	BackgroundColor   string
	BorderRadius      string
	ContentFunc       string
	CrosshairColor    string
	IsCrosshairHidden bool
	IsHidden          bool
	MaxWidthClass     string
	MinWidthClass     string
	PaddingSize       string
	RingColor         string
	RingThickness     string
	SeriesLabelColor  string
	ShadowSize        string
	TitleColor        string
	TitleFormat       string
	ValueColor        string
	ValueFormat       string
}

type ChartType added in v0.2.9

type ChartType string
const (
	ChartTypeArea  ChartType = "area"
	ChartTypeBar   ChartType = "bar"
	ChartTypeDonut ChartType = "donut"
	ChartTypeLine  ChartType = "line"
)

type ChartXAxisSettings added in v0.2.9

type ChartXAxisSettings struct {
	RowKey string

	// OptionalFields
	BaselineColor      string
	GridLineColor      string
	IsGridLineVisible  bool
	IsHidden           bool
	IsTickStartEndOnly bool
	ScaleType          ChartScaleType
	TickLabelColor     string
	TickLabelFormat    string
	Title              string
	TitleColor         string
}

type ChartYAxisPosition added in v0.2.9

type ChartYAxisPosition string
const (
	ChartYAxisPositionLeft  ChartYAxisPosition = "left"
	ChartYAxisPositionRight ChartYAxisPosition = "right"
)

type ChartYAxisSettings added in v0.2.9

type ChartYAxisSettings struct {
	// OptionalFields
	BaselineColor    string
	GridLineColor    string
	IsGridLineHidden bool
	IsHidden         bool
	MaxValue         string
	MinValue         string
	Position         ChartYAxisPosition
	TickCount        uint
	TickLabelColor   string
	TickLabelFormat  string
	Title            string
	TitleColor       string
}

type CloakLoadingSettings added in v0.0.8

type CloakLoadingSettings struct {
	// OptionalFields
	HideDelaySeconds             string
	BackgroundColor              string
	TextMessage                  string
	TextColor                    string
	TextSize                     string
	Icon                         string
	IconSize                     string
	IconColor                    string
	IconAnimationName            string
	IconAnimationDurationSeconds string
}

type ConfirmationDialogSettings added in v0.2.2

type ConfirmationDialogSettings struct {
	IsVisibleTwoWayStatePath string
	OnConfirmFunc            string

	// OptionalFields
	ActionsContent                    templ.Component
	CancelButtonLabel                 string
	CancelFunc                        string
	ConfirmButtonIcon                 string
	ConfirmButtonId                   string
	ConfirmButtonLabel                string
	HeaderContent                     templ.Component
	HeaderIcon                        string
	HeaderIconBackgroundColor         string
	HeaderIconBorderRadius            string
	HeaderIconColor                   string
	HeaderIconPaddingSize             string
	HeaderIconPosition                string
	HeaderSize                        string
	HeaderSubHeading                  string
	HeaderSubHeadingColor             string
	HeaderSubHeadingOneWayStatePath   string
	HeaderTitle                       string
	HeaderTitleColor                  string
	HeaderTitleOneWayStatePath        string
	IsTypeToConfirmEnabled            bool
	IsUncloseable                     bool
	Message                           string
	MessageContent                    templ.Component
	OnCloseFunc                       string
	Size                              string
	TargetIdStatePath                 string
	TargetNameStatePath               string
	TextCase                          string
	TextColor                         string
	TypeToConfirmExpectedValue        string
	TypeToConfirmValueTwoWayStatePath string
	WidthPercent                      int
	HeightPercent                     int
	MinWidthPercent                   int
	MaxWidthPercent                   int
	MinHeightPercent                  int
	MaxHeightPercent                  int
}

type HeaderBlockSettings added in v0.2.2

type HeaderBlockSettings struct {
	// OptionalFields
	ActionsContent                  templ.Component
	HeaderIcon                      string
	HeaderIconBackgroundColor       string
	HeaderIconBorderRadius          string
	HeaderIconColor                 string
	HeaderIconPaddingSize           string
	HeaderIconPosition              string
	HeaderSize                      string
	HeaderSubHeading                string
	HeaderSubHeadingColor           string
	HeaderSubHeadingOneWayStatePath string
	HeaderTitle                     string
	HeaderTitleColor                string
	HeaderTitleOneWayStatePath      string
	HeadingLevel                    string
	TextCase                        string
	TextColor                       string
}

type HeaderIconSettings added in v0.2.2

type HeaderIconSettings struct {
	Name string

	// OptionalFields
	BackgroundColor string
	BorderRadius    string
	Color           string
	PaddingSize     string
}

type LoadingOverlaySettings added in v0.0.6

type LoadingOverlaySettings struct {
	// OptionalFields
	IsLoadingOneWayStatePath string
	BackgroundColor          string
	Icon                     string
	IconSize                 string
	AnimationName            string
	AnimationDurationSeconds string
	Id                       string
}

type ModalSettings added in v0.0.9

type ModalSettings struct {
	MiddleContent templ.Component

	// OptionalFields
	Title                         string
	TitleOneWayStatePath          string
	HeaderContent                 templ.Component
	FooterContent                 templ.Component
	InitialSize                   string
	CurrentSizeTwoWayStatePath    string
	PossibleSizes                 []string
	WidthPercent                  int
	HeightPercent                 int
	MinWidthPercent               int
	MaxWidthPercent               int
	MinHeightPercent              int
	MaxHeightPercent              int
	ShouldHeightMatchContent      bool
	BackdropColor                 string
	BackgroundColor               string
	TextColor                     string
	BorderRadius                  string
	ShadowSize                    string
	RingColor                     string
	RingThickness                 string
	IsVisibleTwoWayStatePath      string
	IsUncloseable                 bool
	IsUnresizable                 bool
	IsMiddleContentScrollDisabled bool
	OnCloseFunc                   string
	OnResizeFunc                  string
}

type TagSettings

type TagSettings struct {
	// OptionalFields
	Size                           string
	TextCase                       string
	OuterRingThickness             string
	OuterRingColor                 string
	OuterBackgroundColor           string
	OuterTextColor                 string
	OuterLeftIcon                  string
	OuterLeftLabel                 string
	OuterLeftLabelOneWayStatePath  string
	OuterLeftOnClickFunc           string
	OuterRightIcon                 string
	OuterRightLabel                string
	OuterRightLabelOneWayStatePath string
	OuterRightOnClickFunc          string
	OuterRadius                    string
	OnRemoveFunc                   string
	RemoveButtonLabel              string
	InnerIcon                      string
	InnerLabel                     string
	InnerLabelOneWayStatePath      string
	InnerValueOneWayStatePath      string
	InnerBackgroundColor           string
	InnerTextColor                 string
	InnerRadius                    string
}

type ToastSettings added in v0.0.5

type ToastSettings struct {
	// OptionalFields
	BackgroundColor    string
	TextColor          string
	Size               string
	RingThickness      string
	RingColor          string
	Radius             string
	AutoDismissSeconds int
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL