Payment Info
A checkout form: card details, an expiry/CVV grid, a billing-address checkbox, comments, and Submit/Cancel actions. Built entirely from nested Horizontal/Vertical AutoLayout sections. Inspired by the shadcn/ui Field/FieldSet checkout form example.
How to Use
- On the Settings tab, edit the section titles/descriptions, the checkbox label, the comments placeholder, and the button text. The Preview tab and the copyable YAML update together. Field labels (Name on Card, Card Number, Month, Year, CVV, Comments) and their placeholders are fixed standard checkout copy, not settings-driven; edit them directly in the pasted YAML if needed.
- Paste the YAML into Power Apps Studio (Ctrl+V). One GroupContainer (conPaymentInfo) is added. Everything nests inside it via Horizontal/Vertical AutoLayout, so it reflows correctly if you resize it.
- Month and Year use Classic/DropDown@2.3.1 (Power Apps' native simple dropdown, not a custom-built one). A full custom click-to-toggle dropdown would be unnecessary complexity for two small static option lists embedded in an already-large form. This is the first use of Classic/DropDown in this component library; if you see anything unexpected in Studio, styling properties (Fill/Color/Border/Radius) are safe to adjust, but avoid adding undocumented properties without checking Power Apps' own property list first.
- The "Same as shipping address" checkbox reuses the same box+SVG-checkmark visual as the standalone Checkbox component in this library, defaults to checked, and toggles via a transparent hit button on top of it.
- Submit shows a confirmation toast (Notify()); it's a placeholder since there's no real payment processing in a paste-anywhere component; wire OnSelect to your real checkout flow once connected. Cancel resets the text/textarea fields and re-checks the billing checkbox via Reset()/Set().
- No OnVisible initialisation needed: the checkbox defaults to checked via Coalesce(var, true), and every other field starts blank.
Problem Solved
Provides a complete, ready-to-style checkout/payment form (card details, expiry/CVV, billing preference, comments, actions) which Power Apps has no single native control for (you'd otherwise hand-build every field and its layout separately).
Integration
All content is plain text substituted directly into the copied YAML (no settings-driven array/formula like Combobox or Data Table). Read submitted values from each field's own control (e.g. inputPICardName.Text, ddPIMonth.Selected.Value, varPISameAsShipping) and wire btnPISubmit.OnSelect to your real payment/checkout logic.
YAML Code
- conPaymentInfo:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
DropShadow: =DropShadow.None
Fill: =RGBA(255, 255, 255, 1)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =20
LayoutWrap: =false
PaddingBottom: =24
PaddingLeft: =24
PaddingRight: =24
PaddingTop: =24
RadiusBottomLeft: =12
RadiusBottomRight: =12
RadiusTopLeft: =12
RadiusTopRight: =12
Height: =690
Width: =420
X: =20
Y: =20
Children:
- conPISectionPayment:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =12
LayoutWrap: =false
Height: =302
Children:
- lblPILegendPayment:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(15, 23, 42, 1)
Font: =Font.'Open Sans'
FontWeight: =FontWeight.Semibold
Size: =14
Text: ="Payment Method"
Height: =20
- lblPIDescPayment:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(100, 116, 139, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="All transactions are secure and encrypted"
Height: =16
- conPICardNameField:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
PaddingBottom: =5
PaddingLeft: =5
PaddingRight: =5
PaddingTop: =5
Height: =70
Children:
- lblPICardNameLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Name on Card"
Height: =16
- inputPICardName:
Control: Classic/TextInput@2.3.2
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
Color: =RGBA(15, 23, 42, 1)
Default: =""
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
HintText: ="Evil Rabbit"
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =10
Height: =35
- conPICardNumberField:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
PaddingBottom: =5
PaddingLeft: =5
PaddingRight: =5
PaddingTop: =5
Height: =88
Children:
- lblPICardNumberLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Card Number"
Height: =16
- inputPICardNumber:
Control: Classic/TextInput@2.3.2
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
Color: =RGBA(15, 23, 42, 1)
Default: =""
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
HintText: ="1234 5678 9012 3456"
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =10
Height: =35
- lblPICardNumberHint:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(148, 163, 184, 1)
Font: =Font.'Open Sans'
Size: =9
Text: ="Enter your 16-digit card number"
Height: =14
- conPIGridRow:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Horizontal
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =12
LayoutWrap: =false
Height: =60
Children:
- conPIMonthField:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =1
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
Children:
- lblPIMonthLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Month"
Height: =16
- ddPIMonth:
Control: Classic/DropDown@2.3.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
ChevronBackground: =RGBA(0, 0, 0, 0)
ChevronFill: =RGBA(148, 163, 184, 1)
ChevronHoverBackground: =Color.Transparent
Color: =RGBA(15, 23, 42, 1)
Fill: =RGBA(255, 255, 255, 1)
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
Items: =["MM","01","02","03","04","05","06","07","08","09","10","11","12"]
SelectionColor: =RGBA(15, 23, 42, 1)
SelectionFill: =RGBA(241, 245, 249, 1)
Size: =10
Height: =40
- conPIYearField:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =1
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
Children:
- lblPIYearLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Year"
Height: =16
- ddPIYear:
Control: Classic/DropDown@2.3.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
ChevronBackground: =RGBA(0, 0, 0, 0)
ChevronFill: =RGBA(148, 163, 184, 1)
ChevronHoverBackground: =Color.Transparent
Color: =RGBA(15, 23, 42, 1)
Fill: =RGBA(255, 255, 255, 1)
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
Items: =["YYYY","2024","2025","2026","2027","2028","2029"]
SelectionColor: =RGBA(15, 23, 42, 1)
SelectionFill: =RGBA(241, 245, 249, 1)
Size: =10
Height: =40
- conPICvvField:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =1
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
Children:
- lblPICvvLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="CVV"
Height: =16
- inputPICvv:
Control: Classic/TextInput@2.3.2
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
Color: =RGBA(15, 23, 42, 1)
Default: =""
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
HintText: ="123"
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =10
Height: =35
- imgPISeparator:
Control: Image@2.2.3
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Fill: =RGBA(226, 232, 240, 1)
Image: =Blank()
Height: =1
- conPISectionBilling:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =12
LayoutWrap: =false
Height: =80
Children:
- lblPILegendBilling:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(15, 23, 42, 1)
Font: =Font.'Open Sans'
FontWeight: =FontWeight.Semibold
Size: =14
Text: ="Billing Address"
Height: =20
- lblPIDescBilling:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(100, 116, 139, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="The billing address associated with your payment method"
Height: =16
- conPICheckboxRow:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Horizontal
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Center
LayoutGap: =8
LayoutWrap: =false
Height: =20
Children:
- conPICheckboxBox:
Control: GroupContainer@1.5.0
Variant: ManualLayout
Properties:
AlignInContainer: =AlignInContainer.Center
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =If(Coalesce(varPISameAsShipping, true), RGBA(15, 23, 42, 1), RGBA(255, 255, 255, 1))
BorderColor: =RGBA(15, 23, 42, 1)
BorderThickness: =1
RadiusBottomLeft: =4
RadiusBottomRight: =4
RadiusTopLeft: =4
RadiusTopRight: =4
Height: =16
Width: =16
Children:
- imgPICheckboxMark:
Control: Image@2.2.3
Properties:
Image: |-
="data:image/svg+xml;utf8, " & EncodeUrl(Substitute("<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'></polyline></svg>", "currentColor", "RGBA(255,255,255,1)"))
Visible: =Coalesce(varPISameAsShipping, true)
Height: =12
Width: =12
X: =2
Y: =2
- btnPICheckboxHit:
Control: Classic/Button@2.2.0
Properties:
BorderStyle: =BorderStyle.None
Color: =RGBA(0, 0, 0, 0)
Fill: =RGBA(0, 0, 0, 0)
Font: =Font.'Open Sans'
HoverColor: =RGBA(0, 0, 0, 0)
HoverFill: =RGBA(0, 0, 0, 0)
OnSelect: =Set(varPISameAsShipping, !Coalesce(varPISameAsShipping, true))
PressedFill: =RGBA(0, 0, 0, 0)
Text: =""
Height: =16
Width: =16
X: =0
Y: =0
- lblPICheckboxLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Center
FillPortions: =1
LayoutMinWidth: =0
Color: =RGBA(15, 23, 42, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Same as shipping address"
- conPISectionComments:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Vertical
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =4
LayoutWrap: =false
PaddingBottom: =5
PaddingLeft: =5
PaddingRight: =5
PaddingTop: =5
Height: =110
Children:
- lblPICommentsLabel:
Control: Label@2.5.1
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
Color: =RGBA(51, 65, 85, 1)
Font: =Font.'Open Sans'
Size: =10
Text: ="Comments"
Height: =16
- inputPIComments:
Control: Classic/TextInput@2.3.2
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
BorderColor: =RGBA(226, 232, 240, 1)
BorderThickness: =1
Color: =RGBA(15, 23, 42, 1)
Default: =""
FocusedBorderThickness: =1
Font: =Font.'Open Sans'
HintText: ="Add any additional comments"
Mode: =TextMode.MultiLine
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =10
Height: =80
- conPIActions:
Control: GroupContainer@1.5.0
Variant: AutoLayout
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =0
LayoutMinWidth: =0
DropShadow: =DropShadow.None
Fill: =RGBA(0, 0, 0, 0)
LayoutDirection: =LayoutDirection.Horizontal
LayoutJustifyContent: =LayoutJustifyContent.Start
LayoutAlignItems: =LayoutAlignItems.Stretch
LayoutGap: =12
LayoutWrap: =false
PaddingBottom: =2
PaddingLeft: =2
PaddingRight: =2
PaddingTop: =2
Height: =44
Children:
- btnPISubmit:
Control: Classic/Button@2.2.0
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =1
LayoutMinWidth: =0
Align: =Align.Center
BorderStyle: =BorderStyle.None
Color: =RGBA(255, 255, 255, 1)
Fill: =RGBA(15, 23, 42, 1)
Font: =Font.'Open Sans'
HoverColor: =RGBA(255, 255, 255, 1)
HoverFill: =RGBA(30, 41, 59, 1)
OnSelect: '=If(IsBlank(inputPICardName.Text) || IsBlank(inputPICardNumber.Text) || IsBlank(inputPICvv.Text) || IsBlank(ddPIMonth.Selected.Value) || ddPIMonth.Selected.Value = "MM" || IsBlank(ddPIYear.Selected.Value) || ddPIYear.Selected.Value = "YYYY", Notify("Please fill in all required payment fields before submitting.", NotificationType.Error), Notify("Payment details submitted — wire this button to your real checkout logic once connected.", NotificationType.Success))'
PressedFill: =RGBA(51, 65, 85, 1)
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =11
Text: ="Submit"
- btnPICancel:
Control: Classic/Button@2.2.0
Properties:
AlignInContainer: =AlignInContainer.Stretch
FillPortions: =1
LayoutMinWidth: =0
Align: =Align.Center
BorderColor: =RGBA(226, 232, 240, 1)
BorderStyle: =BorderStyle.Solid
BorderThickness: =1
Color: =RGBA(15, 23, 42, 1)
Fill: =RGBA(255, 255, 255, 1)
Font: =Font.'Open Sans'
HoverBorderColor: =RGBA(203, 213, 225, 1)
HoverColor: =RGBA(15, 23, 42, 1)
HoverFill: =RGBA(248, 250, 252, 1)
OnSelect: =Reset(inputPICardName); Reset(inputPICardNumber); Reset(inputPICvv); Reset(inputPIComments); Set(varPISameAsShipping, true)
PressedFill: =RGBA(241, 245, 249, 1)
RadiusBottomLeft: =6
RadiusBottomRight: =6
RadiusTopLeft: =6
RadiusTopRight: =6
Size: =11
Text: ="Cancel"Implementation
Copies the customized component code directly to your clipboard. Use Ctrl+V in Power Apps Studio.
Something not pasting right? Troubleshooting guide