Type Property 型プロパティ

card

A button style that doesn’t pad the content, and applies a motion effect when a button has focus. あるボタンスタイル、それはその内容に周りの詰め物をしません、そしてあるモーションエフェクト(運動効果)をボタンがフォーカスされる時に適用します。

Declaration 宣言

static var card: CardButtonStyle { get }
Available when Self is CardButtonStyle.

Discussion 議論

This style doesn’t apply padding to its contents, so images, text, and other content display edge-to-edge. A button with this style appears partially translucent. When the user focuses on a card button, the button animates up to a raised position with more opacity. このスタイルでのボタンは、ある程度半透明に現れます。ユーザがあるカードボタン上にフォーカスする時、そのボタンはあるより不透明な浮上位置へと上方にアニメーションされます。 This style also applies the standard background colors for unfocused and focused states in both light and dark mode.

To apply this style to a button, or to a view that contains buttons, use the buttonStyle(_:) modifier. このスタイルをボタンに、またはボタンを含むビューに適用するには、buttonStyle(_:)修飾子を使ってください。