Documentation
¶
Overview ¶
templ: version: v0.2.793
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Card ¶
Card renders a card component based on the provided props. It can be customized with additional classes and attributes.
Usage:
@components.Card(components.Props{
Class: "custom-card",
Attrs: templ.Attributes{"data-testid": "my-card"},
}) {
// Card content goes here
}
Props:
- Class: Additional CSS classes to apply to the card. Default: "" (empty string)
- Attributes: Additional HTML attributes to apply to the card element. Default: nil
func CardContent ¶
CardContent renders the main content section of a card.
Usage:
@components.CardContent() {
// Main card content goes here
}
func CardDescription ¶
CardDescription renders the description of a card.
Usage:
@components.CardDescription() {
This is a detailed description of the card's content.
}
func CardFooter ¶
CardFooter renders the footer section of a card.
Usage:
@components.CardFooter() {
@button.Button(&button.Props{Label: "Submit"})
}
func CardHeader ¶
CardHeader renders the header section of a card.
Usage:
@components.CardHeader() {
@components.CardTitle() { Card Title }
@components.CardDescription() { Card description goes here }
}
Types ¶
type Props ¶
type Props struct {
// Class specifies additional CSS classes to apply to the card.
// Default: "" (empty string)
Class string
// Attrs allows passing additional HTML attributes to the card element.
// Default: nil
Attrs templ.Attributes
}
Props defines the properties for the Card component.
Click to show internal directories.
Click to hide internal directories.