品牌规则
规范
遵循这些规则,让按钮在所有平台上保持一致。
最小宽度
200pxPadding
14px 32pxBorder radius
16px字重
600 (Semibold)字号
16px文字颜色
#FFFFFF(白色)动画
gradient-shift 6s ease infinite应该
- 完全按照规定使用官方渐变颜色
- 按钮四周至少保留 8px 的留白
- 按钮文字使用「使用 Bink 登录」或其他语言中对应的本地化文案
- 保留动态的 gradient-shift 渐变效果
不应该
- 更改渐变的颜色或方向
- 移除渐变动画
- 在按钮上添加额外的图标或装饰
- 把按钮缩小到最小尺寸以下
选项
变体
三种官方变体,适应不同场景。
Standard
默认按钮,使用 Binatomy 橙色渐变。用于浅色背景。
Dark
深色版本,用于彩色或深色背景。
紧凑型
仅图标版本,适合空间有限的地方。最小 44×44px。
Sizes
集成
代码示例
可直接复制粘贴到你平台上的代码片段。
HTML / CSS
把这段 CSS 添加到你的样式表中,或引入 Bink 按钮样式表:
html<!-- CSS --> <style> @keyframes gradient-shift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } } .btn-bink { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background-image: linear-gradient( 135deg, #ff9500, #f7931e, #ff6b35 30%, #f15a24, #ff8c42 70%, #f7931e, #ff9500 ); background-size: 300% 300%; animation: gradient-shift 6s ease infinite; color: #ffffff; font-weight: 600; font-size: 16px; padding: 14px 32px; border-radius: 16px; border: none; cursor: pointer; text-decoration: none; transition: transform 0.2s ease, box-shadow 0.2s ease; box-shadow: 0 4px 14px 0 rgba(255, 107, 53, 0.3); } .btn-bink:hover { transform: scale(1.03); box-shadow: 0 6px 20px 0 rgba(255, 107, 53, 0.4); } </style> <!-- Button --> <a href="https://bink4.me/api/oauth/authorize?client_id=YOUR_ID&redirect_uri=YOUR_URI&response_type=code" class="btn-bink"> Accedi con Bink </a>React / Next.js
tsx// BinkButton.tsx import './bink-button.css'; // or include the CSS above interface BinkButtonProps { text?: string; clientId: string; redirectUri: string; size?: 'sm' | 'md' | 'lg'; } export function BinkButton({ text = 'Sign in with Bink', clientId, redirectUri, size = 'md', }: BinkButtonProps) { const sizeClass = size === 'sm' ? 'btn-bink-sm' : size === 'lg' ? 'btn-bink-lg' : ''; const authUrl = `https://bink4.me/api/oauth/authorize?${new URLSearchParams({ client_id: clientId, redirect_uri: redirectUri, response_type: 'code', })}`; return ( <a href={authUrl} className={`btn-bink ${sizeClass}`}> {text} </a> ); } // Usage: // <BinkButton clientId="YOUR_ID" redirectUri="https://yourapp.com/callback" />React Native
tsx// BinkButton.tsx (React Native / Expo) import { TouchableOpacity, Text, StyleSheet } from 'react-native'; import { LinearGradient } from 'expo-linear-gradient'; import * as WebBrowser from 'expo-web-browser'; interface Props { text?: string; clientId: string; redirectUri: string; } export function BinkButton({ text = 'Accedi con Bink', clientId, redirectUri, }: Props) { const handlePress = async () => { const params = new URLSearchParams({ client_id: clientId, redirect_uri: redirectUri, response_type: 'code', }); await WebBrowser.openAuthSessionAsync( `https://bink4.me/api/oauth/authorize?${params}`, redirectUri ); }; return ( <TouchableOpacity onPress={handlePress} activeOpacity={0.9}> <LinearGradient colors={['#ff9500', '#f7931e', '#ff6b35', '#f15a24', '#ff8c42']} start={{ x: 0, y: 0 }} end={{ x: 1, y: 1 }} style={styles.button} > <Text style={styles.text}>{text}</Text> </LinearGradient> </TouchableOpacity> ); } const styles = StyleSheet.create({ button: { paddingVertical: 14, paddingHorizontal: 32, borderRadius: 16, alignItems: 'center', justifyContent: 'center', shadowColor: '#ff6b35', shadowOffset: { width: 0, height: 4 }, shadowOpacity: 0.3, shadowRadius: 14, elevation: 6, }, text: { color: '#ffffff', fontWeight: '600', fontSize: 16, }, });
Palette
颜色规格
渐变中使用的 Binatomy 官方配色。
名称Hex用途
Bink Orange
#ff9500主渐变的起点/终点Bink Amber
#f7931e渐变中点Bink Flame
#ff6b35渐变强调色(30%)Bink Red-Orange
#f15a24渐变深度Bink Tangerine
#ff8c42渐变强调色(70%)CSS Gradient
background-image: linear-gradient(
135deg,
#ff9500, /* Bink Orange */
#f7931e, /* Bink Amber */
#ff6b35 30%, /* Bink Flame */
#f15a24, /* Bink Red-Orange */
#ff8c42 70%, /* Bink Tangerine */
#f7931e, /* Bink Amber */
#ff9500 /* Bink Orange */
);
background-size: 300% 300%;
animation: gradient-shift 6s ease infinite;