@bedrock-layout/frame
TypeScript icon, indicating that this package has built-in type declarations

3.2.10 • Public • Published

@bedrock-layout/frame

Frame is a layout helper that frames the content into the desired aspect ratio.

Full docs at: bedrock-layout.dev


When to Use

Use Frame component when you want to crop on-screen content like media into any desired aspect ratio.


How to install

npm install @bedrock-layout/frame

or

yarn add @bedrock-layout/frame


Usage

import { Frame } from '@bedrock-layout/frame';

<Frame>
  <img src='...' />
</Frame>;

data-attribute

For styling purposes, you can select data-bedrock-frame.


API

∏ | Property | Description | Type | Default | | :------: | :---------------------------------------------------------------------------------------------------------------------------: | :---------------: | :-------------------: | ----------------- | | ratio | Aspect ratio that you want the child element to maintain | [number, number] | ${number}/${number} | medium breakpoint | | position | Alignment of the child element. Use object-position value | string | 50% |

Readme

Keywords

Package Sidebar

Install

npm i @bedrock-layout/frame

Weekly Downloads

122

Version

3.2.10

License

MIT

Unpacked Size

6.9 kB

Total Files

7

Last publish

Collaborators

  • jarvis1010