feeditem

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

templ: version: v0.3.977

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(props ContentProps) templ.Component

Content renders the expandable content section, hidden by default.

func FeedItem

func FeedItem(props ...Props) templ.Component

FeedItem renders an expandable feed/inbox item with a clickable header and collapsible content area. Uses Datastar signals for expand/collapse.

func Header(props HeaderProps) templ.Component

Header renders the clickable header that toggles the feed item open/closed.

func ThreadPill

func ThreadPill(props ThreadPillProps) templ.Component

ThreadPill renders a small pill badge linking an item to a thread/topic.

func UrgencyDot

func UrgencyDot(urgency Urgency) templ.Component

UrgencyDot renders a small colored dot indicating urgency level.

Types

type ContentProps

type ContentProps struct {
	FeedItemID string // must match the parent FeedItem's ID
	Class      string
	Attributes templ.Attributes
}

ContentProps configures the expandable content area.

type FeedItemSignals

type FeedItemSignals struct {
	Open bool `json:"open"`
}

FeedItemSignals holds the reactive state for a single feed item.

type HeaderProps

type HeaderProps struct {
	FeedItemID string // must match the parent FeedItem's ID
	Class      string
	Attributes templ.Attributes
}

HeaderProps configures the clickable header area.

type Props

type Props struct {
	ID         string
	Class      string
	Attributes templ.Attributes
}

Props configures the feed item container.

type ThreadPillProps

type ThreadPillProps struct {
	Label string
	Icon  string // emoji or short text
	Class string
}

ThreadPillProps configures the thread pill badge.

type Urgency

type Urgency string

Urgency controls the visual indicator color.

const (
	UrgencyNone     Urgency = ""
	UrgencyCritical Urgency = "critical"
	UrgencyAction   Urgency = "action"
	UrgencyInfo     Urgency = "info"
)

Jump to

Keyboard shortcuts

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