Aside

Use for 1/4, 3/4-proportioned layouts.

  • Install
    npm install @pluralsight/ps-design-system-layout
  • Import
    import { AsideLayout } from '@pluralsight/ps-design-system-layout'

Example

import { colorsBlue, colorsTextIcon, type, layout } from '@pluralsight/ps-design-system-core'
import { AsideLayout } from '@pluralsight/ps-design-system-layout'
import React from 'react'
const Example: React.FC = props => {
return (
<React.Fragment>
<div>
<AsideLayout
aside={
<AsideLayout.Aside>
<BlueBox>A</BlueBox>
</AsideLayout.Aside>
}
main={
<AsideLayout.Main>
<BlueBox>B</BlueBox>
</AsideLayout.Main>
}
/>
</div>
<br />
<div>
<AsideLayout
aside={
<AsideLayout.Aside>
<BlueBox>C</BlueBox>
</AsideLayout.Aside>
}
asidePosition={AsideLayout.asidePositions.last}
main={
<AsideLayout.Main>
<BlueBox>D</BlueBox>
</AsideLayout.Main>
}
/>
</div>
</React.Fragment>
)
}
const BlueBox: React.FC = props => (
<React.Fragment>
<div className="bluebox" {...props} />
<style jsx>{`
.bluebox {
align-items: center;
background: ${colorsBlue[6]};
color: ${colorsTextIcon.highOnDark};
display: flex;
font-weight: ${type.fontWeightStrong};
height: ${layout.spacingLarge};
justify-content: center;
}
`}</style>
</React.Fragment>
)
export default Example

Props

Name
Type
Description
Default
aside
Required
AsideLayout.Asidecontent for aside
asidePosition
first | last
Aside position (from AsideLayout.asidePositions)first
main
Required
AsideLayout.Mainmain content