```
```CSS
body, html {
background: #fff;
padding: 0;
margin: 0;
}
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
display: flex;
}
section {
flex: 0 1 55%;
box-sizing: border-box;
height: 100vh;
background: #ffffff;
}
section + section {
flex: 0 1 45%;
background:#f9fafb;
border-left: 1px solid #e1e1e1;
}
form-wrapper {
max-width: 500px;
margin: 0 20px 0 auto;
box-sizing: border-box;
padding: 60px 0;
text-align: left;
}
rebilly-instruments-summary {
margin: 60px 40px 0 20px;
}
@media (max-width: 600px) {
#app {
flex-direction: column-reverse;
}
rebilly-instruments-summary {
margin: 0;
margin: 20px;
}
form-wrapper {
max-width: auto;
margin: 0;
padding: 20px;
text-align: left;
}
}
```
### 2. Use `css` property to override any styles and change the input labels to `floating`
Target specific classes in the library to modify:
- Inputs
- Heading
- Summary loader
```JavaScript
RebillyInstruments.initialize({
...
theme: {
labels: 'floating'
},
css: `
.rebilly-instruments-content.is-summary,
.rebilly-instruments-summary .rebilly-instruments-loader {
background-color: #f9fafb;
}
.rebilly-instruments-h2 {
font-weight: normal;
}
.rebilly-instruments-form-field-input,
.rebilly-instruments-form-field-select {
height: 60px;
}
.rebilly-instruments-form-field-input:not(:placeholder-shown):focus,
.rebilly-instruments-form-field-input:not(:placeholder-shown),
.rebilly-instruments-form-field-input:focus,
.rebilly-instruments-form-field-select {
padding-top: 28px;
padding-bottom: 6px;
}
.is-floating input:-webkit-autofill + .rebilly-instruments-form-field-label,
.is-floating select:-webkit-autofill + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-input:focus + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-label.is-active {
transform: translateY(-120%) scale(0.875)!important;
}
`,
...
});
```
### Interactive example: `CSS` object
Preview
iframe
JavaScript
```js
import RebillyInstruments from '@rebilly/instruments';
RebillyInstruments.mount({
publishableKey: 'pk_sandbox_123',
organizationId: 'org-123',
websiteId: 'my-website-id',
apiMode: 'sandbox',
theme: {
labels: 'floating',
},
css: `
.rebilly-instruments-content.is-summary,
.rebilly-instruments-summary .rebilly-instruments-loader {
background-color: #f9fafb;
}
.rebilly-instruments-h2 {
font-weight: normal;
}
.rebilly-instruments-form-field-input,
.rebilly-instruments-form-field-select {
height: 60px;
}
.rebilly-instruments-form-field-input:not(:placeholder-shown):focus,
.rebilly-instruments-form-field-input:not(:placeholder-shown),
.rebilly-instruments-form-field-input:focus,
.rebilly-instruments-form-field-select {
padding-top: 28px;
padding-bottom: 6px;
}
.is-floating input:-webkit-autofill + .rebilly-instruments-form-field-label,
.is-floating select:-webkit-autofill + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-input:focus + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-select:focus + .rebilly-instruments-form-field-label,
.is-floating .rebilly-instruments-form-field-label.is-active {
transform: translateY(-120%) scale(0.875)!important;
}
`,
items: [
{
planId: 'my-plan-id',
quantity: 1,
thumbnail: 'https://picsum.photos/200', // Adds a thumbnail
},
{
planId: 'my-plan-id-2',
quantity: 2,
thumbnail: 'https://picsum.photos/200', // Adds a thumbnail
},
],
});
```
HTML
```html