ButtonDescriptive

Button/tile with an icon, title and description.

ButtonDescriptiveBosons

Tag
Type of html tag.
type: string
default: button
Right
Changes position of elements inside button.
type: bool
default: false
Reverse
Changes the order of the icon and text.
type: bool
default: false
Slot
Area for icon or avatar.
type: bool
default: false
Heading
Heading text.
type: string
Caption
Caption text.
type: string
Attrs
Sets attributes in the html tag.
type: gopress.Attrs

Examples

Standard
1// Default standard button
2
3@atoms.ButtonDescriptive(&atoms.ButtonDescriptiveBosons{
4  Heading: "Main page",
5  Caption: "This is where it all starts",
6})
Reversed vertically
1// Reverse button
2
3@atoms.ButtonDescriptive(&atoms.ButtonDescriptiveBosons{
4  Reverse: true,
5  Heading: "Main page",
6  Caption: "This is where it all starts",
7})
Standard with icon
 1// Button with icon
 2
 3@atoms.ButtonDescriptive(&atoms.ButtonDescriptiveBosons{
 4  Slot: true,
 5  Heading: "Main page",
 6  Caption: "This is where it all starts",
 7}) {
 8  @protons.Icon(&protons.IconBosons{
 9    Size: "full",
10  }) {
11    @icons.IconCheck()
12  }
13}
Vertically reversed with avatar
 1// Button with avatar
 2
 3@atoms.ButtonDescriptive(&atoms.ButtonDescriptiveBosons{
 4  Slot: true,
 5  Heading: "Main page",
 6  Caption: "This is where it all starts",
 7}) {
 8  @atoms.Avatar(
 9    &atoms.AvatarBosons{
10      Size: "full",
11      Path: "https://avatars.githubusercontent.com/u/213058?v=4",
12      Alt:  "Radosław Muszyński",
13    },
14  )
15}
Reversed vertically and horizontally with the icon
 1// Reverse button with icon on right
 2
 3@atoms.ButtonDescriptive(&atoms.ButtonDescriptiveBosons{
 4  Slot: true,
 5  Reverse: true,
 6  Right: true,
 7  Heading: "Main page",
 8  Caption: "This is where it all starts",
 9}) {
10  @protons.Icon(&protons.IconBosons{
11    Size: "full",
12  }) {
13    @icons.IconCheck()
14  }
15}

Let's dive deeper and connect!

Gopress is brought to you by Pay For Done. We specialize in crafting products and services rooted in design systems. Join our community to discuss how we can support you.


© 2024 Pay For Done. All Rights Reserved. Website compliant with W3C validation.