Overlay

Overlays are a semi-transparent layer between an image and text to make copy easier to read.

Solid

Storybook failed to load.

Top

Storybook failed to load.

Bottom

Storybook failed to load.

Left

Storybook failed to load.

Right

Storybook failed to load.

Vignette

Storybook failed to load.

With content

Storybook failed to load.

 

bpk-component-overlay

Backpack overlay component.

Installation

Check the main Readme for a complete installation guide.

Usage


                                                
                                                import BpkText from '@skyscanner/backpack-web/bpk-component-text';
                                                import BpkOverlay, { OVERLAY_TYPES } from '@skyscanner/backpack-web/bpk-component-overlay';
                                                
                                                export default () => (
                                                  <div>
                                                    { /* Basic example with tint */}
                                                    <BpkOverlay
                                                      overlayType={OVERLAY_TYPES.solidLow}
                                                    >
                                                      <BpkText>Hotels in Canada</BpkText>
                                                    </BpkOverlay>
                                                
                                                    { /* With the tint invisible */}
                                                    <BpkOverlay>
                                                      <BpkText>Hotels in Canada</BpkText>
                                                    </BpkOverlay>
                                                
                                                    { /* With foreground content */}
                                                    <BpkOverlay foregroundContent={<BpkText>Visit Ottawa</BpkText>}>
                                                      <BpkImage
                                                        altText="altText here"
                                                        aspectRatio={16}
                                                        src="" />
                                                    </BpkOverlay>
                                                  </div>
                                                );

Props

Check out the full list of props on Skyscanner's design system documentation website.

Props

Storybook failed to load.