
Security News
Crates.io Users Targeted by Phishing Emails
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
@elemental-ui-alpha/box
Advanced tools
The box primitive allows consumers to implement aesthetic changes within the constraints of the theme.
import { Box } from '@elemental-ui-alpha/box';
Target the background
color and foreground
color:
<Box background="shade" foreground="accent">
accent
</Box>
The padding keys allow targeting each side as well as the x-axis and y-axis.
padding
paddingTop
paddingRight
paddingBottom
paddingLeft
paddingX
padding-left and padding-rightpaddingY
padding-top and padding-bottom<Box padding="medium" background="shade">
padding
</Box>
The margin keys allow targeting each side as well as the x-axis and y-axis.
margin
marginTop
marginRight
marginBottom
marginLeft
marginX
margin-left and margin-rightmarginY
margin-top and margin-bottom<Box margin="medium" background="shade">
margin
</Box>
The rounding keys allow targeting each box side.
rounding
border-radiusroundingBottom
border-bottom-left-radius and border-bottom-right-radiusroundingLeft
border-bottom-left-radius and border-top-left-radiusroundingRight
border-bottom-right-radius and border-top-right-radiusroundingTop
border-bottom-left-radius and border-bottom-right-radiusThe rounding values don't follow the traditional t-shirt sizes.
none
small
medium
large
<Box rounding="small" background="shade">
rounding
</Box>
Align the text within a box:
textAlign
text-align CSS propertyThe available values match the CSS property:
left
right
center
justify
start
end
<Box textAlign="center" padding="small" background="shade">
centered text
</Box>
Set the height of a box:
height
height CSS property<Box height={100} background="shade">
100px tall
</Box>
Set the width of a box:
width
width CSS property<Box width={200} background="shade">
200px wide
</Box>
Mix and match style properties to achieve the desired aesthetic.
<Box
background="shade"
foreground="action"
paddingX="large"
paddingY="medium"
margin="small"
rounding="small"
width={200}
>
combined
</Box>
Instead of manually managing media queries and adding nested style objects throughout a code base, we offer a convenient shorthand syntax for adding responsive styles with a mobile-first approach.
Each of the above style props accepts a value or array of values. To skip
certain breakpoints, you can pass null
to any position in the array to avoid
generating unnecessary CSS.
While this approach has been widely adopted with great success, much like any new idea, it can seem odd or off-putting at first. We recommend giving it a chance.
<Box background="shade" padding={['small', null, 'medium', 'none', 'large']}>
responsive props
</Box>
FAQs
The box primitive allows consumers to implement aesthetic changes within the constraints of the theme.
We found that @elemental-ui-alpha/box demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The Rust Security Response WG is warning of phishing emails from rustfoundation.dev targeting crates.io users.
Product
Socket now lets you customize pull request alert headers, helping security teams share clear guidance right in PRs to speed reviews and reduce back-and-forth.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.