Content
Usage
import { Align } from '@loomhq/lens'
<Align>Content</Align>
Alignments
Examples
Icon alignments in a Container
Semantic HTML
Use htmlTag
prop to render a more suited element tag. Only default to div
if no other element works better. More about Html5 Semantic Elements.
Responsive props
For responsive props pass an object where the key is the min-width
breakpoint.
prop={{
default: 'xsmall',
xsmall: 'xsmall',
small: 'xsmall',
medium: 'large',
large: 'xlarge',
}}
Custom breakpoint
prop={{
'12em': 'xsmall',
'28em': 'large',
}}
Available breakpoints
breakpoint | min width |
---|---|
xsmall | 31em (496px) |
small | 48em (768px) |
medium | 64em (1024px) |
large | 75em (1200px) |
Responsive examples
Resize the browser to see the effect.
Props
name
type
default
alignment
ResponsiveType
<
| 'topLeft'
| 'topCenter'
| 'topRight'
| 'centerLeft'
| 'center'
| 'centerRight'
| 'bottomLeft'
| 'bottomCenter'
| 'bottomRight'
>
'center'
htmlTag
| 'div'
| 'header'
| 'article'
| 'section'
| 'nav'
| 'aside'
| 'footer'
| 'main'
'div'
children
React.ReactNode
required