-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: multicolumn layout forms * feat: form layouts * fix: linting errors * feat: grid layout * fix: blur causes validation * fix: lint --------- Co-authored-by: adamdottv <2363879+adamdottv@users.noreply.github.com>
- Loading branch information
1 parent
4cb2312
commit 463dcbc
Showing
8 changed files
with
302 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import "github.com/charmbracelet/huh" | ||
|
||
func main() { | ||
form := huh.NewForm( | ||
huh.NewGroup( | ||
huh.NewInput().Title("First"), | ||
huh.NewInput().Title("Second"), | ||
huh.NewInput().Title("Third"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Fourth"), | ||
huh.NewInput().Title("Fifth"), | ||
huh.NewInput().Title("Sixth"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Seventh"), | ||
huh.NewInput().Title("Eigth"), | ||
huh.NewInput().Title("Nineth"), | ||
huh.NewInput().Title("Tenth"), | ||
), | ||
).WithLayout(huh.LayoutColumns(2)) | ||
form.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import "github.com/charmbracelet/huh" | ||
|
||
func main() { | ||
form := huh.NewForm( | ||
huh.NewGroup( | ||
huh.NewInput().Title("First"), | ||
huh.NewInput().Title("Second"), | ||
huh.NewInput().Title("Third"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Fourth"), | ||
huh.NewInput().Title("Fifth"), | ||
huh.NewInput().Title("Sixth"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Seventh"), | ||
huh.NewInput().Title("Eigth"), | ||
huh.NewInput().Title("Nineth"), | ||
huh.NewInput().Title("Tenth"), | ||
), | ||
) | ||
form.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package main | ||
|
||
import "github.com/charmbracelet/huh" | ||
|
||
func main() { | ||
form := huh.NewForm( | ||
huh.NewGroup( | ||
huh.NewInput().Title("First"), | ||
huh.NewInput().Title("Second"), | ||
huh.NewInput().Title("Third"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Fourth"), | ||
huh.NewInput().Title("Fifth"), | ||
huh.NewInput().Title("Sixth"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Seventh"), | ||
huh.NewInput().Title("Eigth"), | ||
huh.NewInput().Title("Nineth"), | ||
huh.NewInput().Title("Tenth"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Eleventh"), | ||
huh.NewInput().Title("Twelveth"), | ||
huh.NewInput().Title("Thirteenth"), | ||
), | ||
).WithLayout(huh.LayoutGrid(2, 2)) | ||
form.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import "github.com/charmbracelet/huh" | ||
|
||
func main() { | ||
form := huh.NewForm( | ||
huh.NewGroup( | ||
huh.NewInput().Title("First"), | ||
huh.NewInput().Title("Second"), | ||
huh.NewInput().Title("Third"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Fourth"), | ||
huh.NewInput().Title("Fifth"), | ||
huh.NewInput().Title("Sixth"), | ||
), | ||
huh.NewGroup( | ||
huh.NewInput().Title("Seventh"), | ||
huh.NewInput().Title("Eigth"), | ||
huh.NewInput().Title("Nineth"), | ||
huh.NewInput().Title("Tenth"), | ||
), | ||
).WithLayout(huh.LayoutStack) | ||
form.Run() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.