- Add PLAN.md with 40-step checklist across 10 phases - Add CLAUDE.md with project-specific instructions - Set up nix flake with FastHTML/MonsterUI dependencies - Create Python package skeleton (src/animaltrack) - Vendor FastHTML and MonsterUI documentation - Add Docker build configuration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2.1 KiB
2.1 KiB
Buttons & Links API Reference
See Source
See Output
DefaultPrimarySecondaryDangerTextLinkGhost
[code]
def ex_buttons():
return Grid(
Button("Default"),
Button("Primary", cls=ButtonT.primary),
Button("Secondary", cls=ButtonT.secondary),
Button("Danger", cls=ButtonT.destructive),
Button("Text", cls=ButtonT.text),
Button("Link", cls=ButtonT.link),
Button("Ghost", cls=ButtonT.ghost),
)
[/code]
See Source
See Output
Default LinkMuted LinkText LinkReset LinkPrimary LinkClassic Link
[code]
def ex_links():
return Div(cls='space-x-4')(
A('Default Link'),
A('Muted Link', cls=AT.muted),
A('Text Link', cls=AT.text),
A('Reset Link', cls=AT.reset),
A('Primary Link', cls=AT.primary),
A('Classic Link', cls=AT.classic),)
[/code]
Button
Source
[code]
Button(*c: Union[str, fastcore.xml.FT], cls: Union[str, enum.Enum] = <ButtonT.default: 'uk-btn-default'>, submit=True, **kwargs) -> fastcore.xml.FT
[/code]
Button with Styling (defaults to
submitfor form submission)
Params
-
cContents ofButtontag (often text) -
clsClasses in addition toButtonstyling (useButtonTfor built in styles) -
submitWhether the button should submit a form -
kwargs
Returns: Button(..., cls='uk-btn')
ButtonT
Options for styling Buttons
| Option | Value | Option | Value | Option | Value |
|---|---|---|---|---|---|
| default | uk-btn-default | ghost | uk-btn-ghost | primary | uk-btn-primary |
| secondary | uk-btn-secondary | destructive | uk-btn-destructive | text | uk-btn-text |
| link | uk-btn-link | xs | uk-btn-xs | sm | uk-btn-sm |
| lg | uk-btn-lg | xl | uk-btn-xl | icon | uk-btn-icon |
AT
Link styles from https://franken-ui.dev/docs/link
| Option | Value | Option | Value |
|---|---|---|---|
| muted | uk-link-muted | text | uk-link-text |
| reset | uk-link-reset | primary | uk-link text-primary hover:text-primary-focus underline |
| classic | text-blue-600 hover:text-blue-800 underline |