components

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package components provides UI components for the quickstart example.

Package components provides UI components for the quickstart example.

Package components provides UI components for the quickstart example.

Package components provides UI components for the quickstart example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateHelpPanel

func CreateHelpPanel(_ HelpPanelProps) (bubbly.Component, error)

CreateHelpPanel creates a component that displays keyboard shortcuts. This demonstrates: - Simple static component pattern - Using BubblyUI Text component - Clean presentation of help information

func CreateTaskInput

func CreateTaskInput(props TaskInputProps) (bubbly.Component, error)

CreateTaskInput creates a component for adding new tasks. This demonstrates: - Text input handling with reactive state - Using BubblyUI Card component - Event-based communication with parent

func CreateTaskList

func CreateTaskList(props TaskListProps) (bubbly.Component, error)

CreateTaskList creates a component that displays the task list. This demonstrates: - Using the clean import path for bubblyui - Props-based composition - Using BubblyUI components (Card, Text) - Reactive state rendering

func CreateTaskStats

func CreateTaskStats(props TaskStatsProps) (bubbly.Component, error)

CreateTaskStats creates a component that displays task statistics. This demonstrates: - Computed-like pattern with function props - Using BubblyUI components for styling - Clean separation of data and presentation

Types

type HelpPanelProps

type HelpPanelProps struct {
}

HelpPanelProps defines the props for HelpPanel component.

type TaskInputProps

type TaskInputProps struct {
	InputText *bubblyui.Ref[string]
	InputMode *bubblyui.Ref[bool] // Whether input mode is active
	IsFocused func() bool
	OnSubmit  func(text string)
}

TaskInputProps defines the props for TaskInput component.

type TaskListProps

type TaskListProps struct {
	Tasks         *bubblyui.Ref[[]composables.Task]
	SelectedIndex *bubblyui.Ref[int]
	Filter        *bubblyui.Ref[string]
	IsFocused     func() bool
	OnToggle      func(id int)
	OnDelete      func(id int)
	GetFiltered   func(filter string) []composables.Task
}

TaskListProps defines the props for TaskList component.

type TaskStatsProps

type TaskStatsProps struct {
	ActiveCount func() int
	DoneCount   func() int
	TotalCount  func() int
	Filter      *bubblyui.Ref[string] // Current filter: "all", "active", "done"
}

TaskStatsProps defines the props for TaskStats component.

Jump to

Keyboard shortcuts

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