Card does not filled up allocated Grid spaces #3615
-
Hey there 👋 , I noticed that the I managed to do it with Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Disclaimer: This is a very experimental bot using OpenAI's GPT-4. The answers may not be correct, a human will review the answer and update it if necessary. Hello! 👋 The If you find yourself limited by the default styling and constraints of a Card, you may consider using a Box instead. The Box component is a simple wrapper component that takes tokens instead of using CSS. It provides quick and direct access to the Twilio design language while preventing any other value. Using Here's an example of how you might use it: import {Box, Card, Grid, Column} from '@twilio-paste/core';
const Component = () => (
<Grid>
<Column>
<Box width="100%">
<Card>
{/* Card content */}
</Card>
</Box>
</Column>
</Grid>
); I hope this helps! If you have further questions or need more clarification, feel free to ask. I also did a search, and I managed to find these other Discussions that might be similar or related to your question. Give them a read to see if they answer your question. If they do, head back here and update this discussion and mark it as answered, pointing others to the related discussion:
|
Beta Was this translation helpful? Give feedback.
-
PasteBot is correct that using a Box is fine. The Card behavior is intended as the component fits the width of the content, and without full-width content, Grid, which uses flex, will shrink down the width. Take a look at those relevant discussions linked in the PasteBot reply. The second one contains a helpful CodeSandbox that shows different ways Cards can be sized using different layout wrappers. |
Beta Was this translation helpful? Give feedback.
PasteBot is correct that using a Box is fine. The Card behavior is intended as the component fits the width of the content, and without full-width content, Grid, which uses flex, will shrink down the width. Take a look at those relevant discussions linked in the PasteBot reply. The second one contains a helpful CodeSandbox that shows different ways Cards can be sized using different layout wrappers.