Last modified: 4/Oct/2024
Card Frame
The Card.Frame
is a simple UI wrapper around containers. As we’re replacing the main content area of pages with a single card element, the Card.Frame
will help us create the layout inside the card element. This element fills up the horizontal space of its container, has 24px padding and a lightGrey solid border with 12px border-radius.
#Usage
import { Card } from '@kinsta/stratus'
const myComponent = () => (
<Card>
<Card.Frame header="Empire Strikes Back">
The Emperor has been expecting you. I know, father. So, you have accepted the truth. I've accepted the truth that you were once Anakin Skywalker, my father. That name no longer has any meaning for me.
</Card.Frame>
</Card>
)
#Props
The Card
components interface extends the
HTMLElement
interface. So you can use any props which documented there. Also, you can utilize all the React Synthetic events (on*
),
and props related to styling (className
, style
).
#header
string | ReactElement<any, string | JSXElementConstructor<any>>
Header of the Card
#description
string | ReactElement<any, string | JSXElementConstructor<any>>
Description of the Frame
#headerRightSlot
string | false | ReactElement<any, string | JSXElementConstructor<any>>
Placeholder to place content next to the title
#isLoading
boolean
Show if the component is being loaded
#topLoaderText
string
The top loader text
#isTopLoading
boolean
Shows the TopLoader text
#topSlot
string | false | ReactElement<any, string | JSXElementConstructor<any>>
Placeholder above the Header
#isHeaderSticky
boolean
Enabling the sticky header
#stickyHeaderOffset
number
#isDisabled
boolean
Determines whether it looks disabled. Note that the buttons, input fields or any other interactive elements need to be disabled manually.
#isMinimal
boolean
If it is set to
true
, then it removes the border and the padding around the Card. It's useful when you need to position subtitle or description inside of a Card component.#isInteractive
boolean
Determines whether the card will have interactive properties, such as hover, focus, active
#Types
FrameInterface
: props of theCard.Frame
subcomponent processed by stratus extended byCardInterface
Read more about types here