# Floating Action Button URL: /react/components/floating-action-button Source: https://github.com/daangn/seed-design/blob/dev/docs/content/react/components/floating-action-button.mdx A button that floats on the screen and executes the primary action. 사용 가능 버전: @seed-design/react@0.0.30, @seed-design/css@0.0.30 ## Preview ```tsx import { FloatingActionButton } from "seed-design/ui/floating-action-button"; import IconPlusLine from "@karrotmarket/react-monochrome-icon/IconPlusLine"; export default function FloatingActionButtonPreview() { return } label="Example FAB" />; } ``` ## Installation - npm: npx @seed-design/cli@latest add ui:floating-action-button - pnpm: pnpm dlx @seed-design/cli@latest add ui:floating-action-button - yarn: yarn dlx @seed-design/cli@latest add ui:floating-action-button - bun: bun x @seed-design/cli@latest add ui:floating-action-button ## Props ## Examples ### Extended You can control label display and layout using the `extended` prop. Regardless of whether `extended` is used, `label` is a required prop for accessibility. ```tsx import { FloatingActionButton } from "seed-design/ui/floating-action-button"; import { Switch } from "seed-design/ui/switch"; import IconPlusLine from "@karrotmarket/react-monochrome-icon/IconPlusLine"; import { Flex, VStack } from "@seed-design/react"; import { useState } from "react"; export default function FloatingActionButtonExtended() { const [extended, setExtended] = useState(true); return ( } label="Extended" extended={extended} /> ); } ``` ### Float Composition Floating Action Button is convenient to use with the `` component. ```tsx import { FloatingActionButton } from "seed-design/ui/floating-action-button"; import { IconBellFill } from "@karrotmarket/react-monochrome-icon"; import { Box, Float } from "@seed-design/react"; export default function FloatingActionButtonFloatComposition() { return ( } label="알림 설정" /> ); } ```