export const title = "Credit card components" export const description = "Free and open-source React credit card components built for modern applications and websites. These credit cards are built using React Aria and styled with Tailwind CSS." export const links = { github: "https://github.com/untitleduico/react/tree/main/components/shared-assets/credit-card", } import * as Demos from "@/components/shared-assets/credit-card/credit-card.demo.tsx"; ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ## Installation You can add this credit card component using our CLI or manually: ```bash npx untitledui@latest add credit-card ``` Copy the files below into your project: Great! Now you can start using the credit card components in your project by just copy/pasting our examples below. ## Customization The credit card component has props like `type`, `company`, `cardNumber`, `cardHolder`, and `cardExpiration` that can be used to customize the card. ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ## Sizes The credit card component has a `width` prop that can be used to set the width of the card. Based on the width, the height will be automatically adjusted to maintain the aspect ratio. ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ## Credit card types Below are examples and variations of the credit card component: ### Transparent {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Transparent gradient {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Brand dark {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Brand light {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gray dark {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gray light {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Transparent strip {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gray strip {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gradient strip {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Salmon strip {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gray strip vertical {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Gradient strip vertical {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ``` ### Salmon strip vertical {{ tocOnly:true }} ```jsx import CreditCard from '@/components/shared-assets/credit-card/credit-card'; ```